question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

StaticTest.test_unicode fails on codeanywhere

See original GitHub issue
____________________________________________________________________________________________ StaticTest.test_unicode _____________________________________________________________________________________________
                                                                                                                                                                                                                  
self = <cherrypy.test.test_static.StaticTest testMethod=test_unicode>                                                                                                                                             
                                                                                                                                                                                                                  
    @pytest.mark.xfail(py27_on_windows, reason="#1544")                                                                                                                                                           
    def test_unicode(self):                                                                                                                                                                                       
>       with self.unicode_file():                                                                                                                                                                                 
                                                                                                                                                                                                                  
cherrypy/test/test_static.py:379:                                                                                                                                                                                 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/lib/python2.7/contextlib.py:17: in __enter__                                                                                                                                                                 
    return self.gen.next()                                                                                                                                                                                        
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
                                                                                                                                                                                                                  
    @staticmethod                                                                                                                                                                                                 
    @contextlib.contextmanager                                                                                                                                                                                    
    def unicode_file():                                                                                                                                                                                           
        filename = ntou('Слава Україні.html', 'utf-8')                                                                                                                                                            
        filepath = os.path.join(curdir, 'static', filename)                                                                                                                                                       
>       with io.open(filepath, 'w', encoding='utf-8') as strm:                                                                                                                                                    
E       UnicodeEncodeError: 'ascii' codec can't encode characters in position 43-47: ordinal not in range(128)                                                                                                    
                                                                                                                                                                                                                  
cherrypy/test/test_static.py:366: UnicodeEncodeError                                                                                                                                                              
===================================================================== 1 failed, 252 passed, 4 skipped, 2 xfailed, 5 xpassed in 80.13 seconds =====================================================================
ERROR: InvocationError: '/home/cabox/workspace/.tox/python/bin/pytest'                                                                                                                                            
____________________________________________________________________________________________________ summary _____________________________________________________________________________________________________
ERROR:   python: commands failed

Running tox on codeanywhere causes this test to fail.

  • I’m submitting a … [x ] bug report [ ] feature request [ ] question about the decisions made in the repository

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:13 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
jaracocommented, Feb 26, 2017

Setting LC_LANG or LANG has no effect either.

0reactions
jaracocommented, Feb 26, 2017

Non-support of fixtures is a known limitation of the unittest compatibility.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Support - Codeanywhere Docs
Detailed description of the issue; Provide any error messages you are receiving; Was it working previously for you? Attach print screens (where applicable)...
Read more >
Terms of Service - Codeanywhere
Codeanywhere.com does not warrant that the Service will meet your specific requirements; the Service will be uninterrupted, timely, secure, or error-free.
Read more >
Invalid verify · Codeanywhere
Account Not Verified · Invalid verification code · Languages & Frameworks · Databases.
Read more >
Frequently Asked Questions - Codeanywhere Docs
How to access the IDE after I've created an account? Codeanywhere has introduced a new and improved VS Code based editor with a...
Read more >
Cloud IDE · Online Code Editor - Codeanywhere
Save time by deploying a development environment in seconds. Collaborate, code, learn, build, and run your projects directly from your browser.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found