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

TypeError in pkg_resources.resource_stream on Python 3 #32

Closed
ghost opened this issue Jul 3, 2013 · 1 comment
Closed

TypeError in pkg_resources.resource_stream on Python 3 #32

ghost opened this issue Jul 3, 2013 · 1 comment

Comments

@ghost
Copy link

ghost commented Jul 3, 2013

Originally reported by: jaraco (Bitbucket: jaraco, GitHub: jaraco)


The use of StringIO in pkg_resources.resource_stream appears to be causing errors in setuptools 0.8:

> python
Python 3.3.2 (v3.3.2:d047928ae3f6, May 16 2013, 00:06:53) [MSC v.1600 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import pkg_resources
>>> pkg_resources.require('pytz')[0].version
'2013b'
>>> import pytz
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<frozen importlib._bootstrap>", line 1567, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1534, in _find_and_load_unlocked
  File "c:\python\lib\site-packages\pytz-2013b-py3.3.egg\pytz\__init__.py", line 1103, in <module>
  File "c:\python\lib\site-packages\pytz-2013b-py3.3.egg\pytz\__init__.py", line 1103, in <listcomp>
  File "c:\python\lib\site-packages\pytz-2013b-py3.3.egg\pytz\__init__.py", line 107, in resource_exists
  File "c:\python\lib\site-packages\pytz-2013b-py3.3.egg\pytz\__init__.py", line 100, in open_resource
  File "c:\python\lib\site-packages\setuptools-0.8b5-py3.3.egg\pkg_resources.py", line 951, in resource_stream
  File "c:\python\lib\site-packages\setuptools-0.8b5-py3.3.egg\pkg_resources.py", line 1405, in get_resource_stream
  File "c:\python\lib\site-packages\setuptools-0.8b5-py3.3.egg\pkg_resources.py", line 1982, in StringIO
TypeError: initial_value must be str or None, not bytes

@ghost
Copy link
Author

ghost commented Jul 3, 2013

Original comment by jaraco (Bitbucket: jaraco, GitHub: jaraco):


Fixed in 26f59ec0f0f6, slated for 0.8b6+

@ghost ghost closed this as completed Mar 29, 2016
jaraco added a commit that referenced this issue Mar 29, 2016
convert "find_in_zip" into "find_eggs_in_zip" to prevent it from walking whl files. Fixes #129
jaraco added a commit that referenced this issue Apr 4, 2016
FreeBSD: Add root certificate from ca_root_nss.
jaraco added a commit that referenced this issue Apr 24, 2021
bpo-41882: Clean up after CCompiler.has_function()
This issue was closed.
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

0 participants