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

Fix UnicodeEncodeError in #2466

merged 3 commits into from Jun 29, 2018


Copy link

I don't know why but on MacOS when you execute this command python -m and redirect output stream to some another file, script fails with exception.

$ python -m > test.txt 
Traceback (most recent call last):
  File "/usr/local/Cellar/python@2/2.7.15/Frameworks/Python.framework/Versions/2.7/lib/python2.7/", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/local/Cellar/python@2/2.7.15/Frameworks/Python.framework/Versions/2.7/lib/python2.7/", line 72, in _run_code
    exec code in run_globals
  File "/Users/maxkrivich/Projects/pipenv/pipenv/", line 89, in <module>
  File "/Users/maxkrivich/Projects/pipenv/pipenv/", line 48, in main
    print(u'Pipenv–specific environment variables:')
UnicodeEncodeError: 'ascii' codec can't encode character u'\u2013' in position 6: ordinal not in range(128)

Copy link

Thanks for the pr (again)

I wonder if this works on windows... will test when I get home

Copy link
Contributor Author

maxkrivich commented Jun 28, 2018

@techalchemy I'm not sure what it is reproducible on windows. That module really very powerful and I just wanna to improve them.

Copy link

Yeah just want to make sure that the explicit encoding doesn't break anything in the console, checking now

Copy link

works ok for me, thanks for the fix!

@techalchemy techalchemy added this to the 2018.7.0 milestone Jun 28, 2018
@techalchemy techalchemy merged commit 9d826c4 into pypa:master Jun 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

None yet

2 participants