Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect StringIO import in testing.py #708

Closed
genericmoniker opened this issue Apr 2, 2013 · 0 comments
Closed

Incorrect StringIO import in testing.py #708

genericmoniker opened this issue Apr 2, 2013 · 0 comments

Comments

@genericmoniker
Copy link

I'm getting Lots of errors while using the LogTrapTestCase:

TypeError: unicode argument expected, got 'str'

I believe this is because of these lines in testing.py:

try:
from io import StringIO # py3
except ImportError:
from cStringIO import StringIO # py2

The first import works fine on Python 2.7.3, but now all log messages are expected to be unicode. Elsewhere in the Tornado source the construct is:

try:
from cStringIO import StringIO # py2
except ImportError:
from io import StringIO # py3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant