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
locale.getpreferredencoding doesn't return result #74594
Comments
Exception:
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/usr/lib/python2.7/site-packages/pip/commands/install.py", line 312, in run
wheel_cache
File "/usr/lib/python2.7/site-packages/pip/basecommand.py", line 295, in populate_requirement_set
wheel_cache=wheel_cache):
File "/usr/lib/python2.7/site-packages/pip/req/req_file.py", line 84, in parse_requirements
filename, comes_from=comes_from, session=session
File "/usr/lib/python2.7/site-packages/pip/download.py", line 422, in get_file_content
content = auto_decode(f.read())
File "/usr/lib/python2.7/site-packages/pip/utils/encoding.py", line 31, in auto_decode
return data.decode(locale.getpreferredencoding(False))
TypeError: decode() argument 1 must be string, not None |
File "/usr/lib/python2.7/site-packages/pip/utils/encoding.py", line 31, in auto_decode I'm sorry, but this issue looks like a bug in pip, not in Python. Please report the issue at https://github.com/pypa/pip/issues |
Oh, I'm sorry, I read too fast. I didn't notice the pull request. It seems like a real bug in Python 2.7. |
ok, is this a valid fix then?
STINNER Victor added the comment:
I backported this commit, but I didn't notice the bug in the code... In fact, this commit was followed by the commit 6a448d4. ---------- Python tracker <report@bugs.python.org> |
Yes, totally. Sorry, ignore my first comment. |
Sean McCully: Thank you very much for both your bug report and for your pull request! You got your name into Python ;-) |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: