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
scandir as dependency: UnicodeDecodeError #953
Comments
This looks like another manifestation of #706. |
That's because scandir was successfully installed the first time, but failed at the cleanup stage, so the second attempt finds scandir already installed and bypassed the part that creates the error. I'm unable to replicate the underlying issue except when unicode is passed to rmtree:
This suggests to me that the And when I test in my local Linux workstation, I find that's the case for me as well:
Maybe I should just take that restriction out and always cast to string on Linux and Python 2. |
Give 34.1.1 a try, releasing momentarily. |
Thanks! It now works fine. I tested both version |
If I set
scandir
as a dependency, then installation on a system that does not already have scandir fails withUnicodeDecodeError
.Versions
Ubuntu 16.04
2.7.12
34.1.0
9.0.1
Steps to reproduce
Start with a clean environment that does not already have scandir installed. I'm using the Dockerimage
ubuntu:16.04
, with the following system configuration:Create a test project and a
setup.py
file:Run install command:
Expected outcome
Package is installed.
Actual outcome
Installation fails with
UnicodeDecodeError
(see log above).Useful information
If I re-run the setup.py install command above a second time, it works.
If I install scandir with pip (
pip install scandir
) before running the install command above, it works fine on the first attempt.The character referenced in the error comes from the file name
unicodƏ.txt
(also seen in the log). When thejoin()
function inposixpath.py
tries to treat it as ASCII to convert to unicode it fails, becauseƏ
is not an ASCII character.The text was updated successfully, but these errors were encountered: