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

Binary bin file can not be installed in latest setuptools #564

Closed
yaoking opened this issue Apr 29, 2016 · 3 comments
Closed

Binary bin file can not be installed in latest setuptools #564

yaoking opened this issue Apr 29, 2016 · 3 comments

Comments

@yaoking
Copy link

yaoking commented Apr 29, 2016

Recently, I upgrade my setuptools from 4.0.1 to 20.2.2, I found the binary bin file in script can not be installed.
There will be decode error: UnicodeDecodeError: 'utf8' codec can't decode byte 0xb0 in position 24: invalid start byte
It seems open('rb') is used in 4.0.1, but io.open('r') replace it in 20.2.2.
Could you help check this issue? Thanks!

@jaraco
Copy link
Member

jaraco commented Apr 29, 2016

You'll have to provide more information, perhaps a traceback or similar. io.open('r') doesn't appear anywhere in the setuptools codebase, so I assume you must be paraphrasing.

I do see this section where a script is opened as text. Is that where the error occurs?

@jaraco
Copy link
Member

jaraco commented Apr 29, 2016

Looking at #218, it seems that this is a duplicate of #210. Setuptools 4.0 and 4.0.1 were the only versions that had a fix for this issue, but because the fix caused regressions in other systems, it had to be rolled back in 5.0.

@yaoking
Copy link
Author

yaoking commented May 3, 2016

Hi,
Attach more info, please confirm this is not new issue.
File "/opt/ute/python/lib/python2.7/distutils/core.py", line 152, in setup
dist.run_commands()
File "/opt/ute/python/lib/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/opt/ute/python/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/opt/ute/python/lib/python2.7/site-packages/ute_installer/command/develop.py", line 30, in run
SetuptoolsDevelop.run(self, _args, *_kw)
File "/opt/ute/python/lib/python2.7/site-packages/setuptools/command/develop.py", line 34, in run
self.install_for_development()
File "/opt/ute/python/lib/python2.7/site-packages/setuptools/command/develop.py", line 133, in install_for_development
self.process_distribution(None, self.dist, not self.no_deps)
File "/opt/ute/python/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 697, in process_distribution
self.install_egg_scripts(dist)
File "/opt/ute/python/lib/python2.7/site-packages/setuptools/command/develop.py", line 168, in install_egg_scripts
script_text = strm.read()
File "/opt/ute/python/lib/python2.7/codecs.py", line 296, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf8' codec can't decode byte 0xb0 in position 24: invalid start byte
Raise error when run here.
with io.open(script_path) as strm:
script_text = strm.read()
I think the default open mode is 'r', but my script is binary file.
scripts=['script/cli_aatrace_utility_debian']
Thanks!

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

No branches or pull requests

2 participants