
GITHUB . COM {
}
Detected CMS Systems:
- Wordpress (2 occurrences)
Title:
"import pkg_resources" fails with UnicodeDecodeError while parsing /usr/lib/pymodules/python2.7/rpl-1.5.5.egg-info Β· Issue #719 Β· pypa/setuptools
Description:
My ubuntu has an egg-info that pkg_resources fails to read with a UnicodeDecodeError. This made all sorts of things fail in my virtual environment. > git clone https://github.com/pypa/setuptools ... > cd setuptools/ > python -c "import p...
Website Age:
17 years and 9 months (reg. 2007-10-09).
Matching Content Categories {π}
- Technology & Computing
- Video & Online Content
- Graphic Design
Content Management System {π}
What CMS is github.com built with?
Github.com uses WORDPRESS.
Traffic Estimate {π}
What is the average monthly size of github.com audience?
ππ Tremendous Traffic: 10M - 20M visitors per month
Based on our best estimate, this website will receive around 10,666,394 visitors per month in the current month.
check SE Ranking
check Ahrefs
check Similarweb
check Ubersuggest
check Semrush
How Does Github.com Make Money? {πΈ}
Subscription Packages {π³}
We've located a dedicated page on github.com that might include details about subscription plans or recurring payments. We identified it based on the word pricing in one of its internal links. Below, you'll find additional estimates for its monthly recurring revenues.How Much Does Github.com Make? {π°}
Subscription Packages {π³}
Prices on github.com are in US Dollars ($).
They range from $4.00/month to $21.00/month.
We estimate that the site has approximately 5,347,507 paying customers.
The estimated monthly recurring revenue (MRR) is $22,459,531.
The estimated annual recurring revenues (ARR) are $269,514,368.
Wordpress Themes and Plugins {π¨}
What WordPress theme does this site use?
It is strange but we were not able to detect any theme on the page.
What WordPress plugins does this website use?
It is strange but we were not able to detect any plugins on the page.
Keywords {π}
file, line, issue, pkgresourcesinitpy, jaraco, micklat, error, pkgresources, commented, unicodedecodeerror, setuptools, environment, package, import, fails, usrlibpymodulespythonrplegginfo, egginfo, metadata, added, author, member, packages, rpl, sign, mdversion, work, trace, variable, users, list, bad, fix, source, pull, projects, parsing, fail, python, versionfromfileselfgetmetadataselfpkginfo, github, make, properly, patch, version, good, solution, similar, problem, offending, installed,
Topics {βοΈ}
parsing /usr/lib/pymodules/python2 unicodedecodeerror /usr/lib/pymodules/python2 /usr/lib/pymodules/python2 /usr/lib/python2 problematic egg-info file activity micklat changed invalid start byte defective build system pull request bad egg-infos decode byte 0xb6 open ticket enable legacy environments comment metadata assignees read version number suppress decoding errors labels projects projects milestone nicer error message virtualenv work properly patch pkg_resources/init custom ubuntu package /pypa/setuptools jaraco added hard-coded list egg-info fool github lenient decoding suppress errors setuptools aad4a69 installing setuptools installed version properly encoded source issue-719 branch added extension bad eggs bad-eggs import pkg_resources recent call platform=platform 'utf8' codec md_version = _version_from_file people running offending character report explains invoke pkg_resources eventually track latest release project page
Payment Methods {π}
- Braintree
Questions {β}
- Already have an account?
- And that leads me to wonder, does it really need to fail fast and hard here, or just be noisy?
- But why can't things just work?
- How does this approach strike you?
- I don't see much point in sending users off to google what this problem with UnicodeDecodeError and what's the accepted workaround ("oh, so I have to set this environment variable and then it works?
- I mean, what's the benefit from that virtual legwork?
- Thoughts?
Schema {πΊοΈ}
DiscussionForumPosting:
context:https://schema.org
headline:"import pkg_resources" fails with UnicodeDecodeError while parsing /usr/lib/pymodules/python2.7/rpl-1.5.5.egg-info
articleBody:My ubuntu has an egg-info that pkg_resources fails to read with a UnicodeDecodeError. This made all sorts of things fail in my virtual environment.
```
> git clone https://github.com/pypa/setuptools
...
> cd setuptools/
> python -c "import pkg_resources"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "pkg_resources/__init__.py", line 2964, in <module>
@_call_aside
File "pkg_resources/__init__.py", line 2950, in _call_aside
f(*args, **kwargs)
File "pkg_resources/__init__.py", line 2977, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "pkg_resources/__init__.py", line 626, in _build_master
ws = cls()
File "pkg_resources/__init__.py", line 619, in __init__
self.add_entry(entry)
File "pkg_resources/__init__.py", line 675, in add_entry
for dist in find_distributions(entry, True):
File "pkg_resources/__init__.py", line 1988, in find_on_path
path_item, entry, metadata, precedence=DEVELOP_DIST
File "pkg_resources/__init__.py", line 2376, in from_location
py_version=py_version, platform=platform, **kw
File "pkg_resources/__init__.py", line 2717, in _reload_version
md_version = _version_from_file(self._get_metadata(self.PKG_INFO))
File "pkg_resources/__init__.py", line 2341, in _version_from_file
line = next(iter(version_lines), '')
File "pkg_resources/__init__.py", line 2509, in _get_metadata
for line in self.get_metadata_lines(name):
File "pkg_resources/__init__.py", line 1879, in get_metadata_lines
return yield_lines(self.get_metadata(name))
File "pkg_resources/__init__.py", line 1869, in get_metadata
metadata = f.read()
File "/usr/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 0xb6 in position 147: invalid start byte in /usr/lib/pymodules/python2.7/rpl-1.5.5.egg-info
```
The problematic egg-info file is attached, with an added extension (txt) to fool github into accepting the attachment.
[rpl-1.5.5.egg-info.txt](https://github.com/pypa/setuptools/files/401454/rpl-1.5.5.egg-info.txt)
This is with python 2.7.2 and setuptools aad4a6913d3e505064c76322d20756909724c411.
To make my virtualenv work properly, I had to patch pkg_resources/**init**.py, replacing the line:
```
md_version = _version_from_file(self._get_metadata(self.PKG_INFO))
```
in EggInfoDistribution._reload_version with this:
```
try:
md_version = _version_from_file(self._get_metadata(self.PKG_INFO))
except UnicodeDecodeError as e:
warnings.warn(
'failure to read version number of %s at %s due to: %s' % (self.project_name, self.location, e))
md_version = None
```
I can make a pull request out of this if you think this is a good solution.
BTW, the stack trace looks similar to that of #531 . You can also see multiple other people running into the same problem on stackoverflow.com, [here](http://stackoverflow.com/questions/34440958/cant-run-pip-unicodedecodeerror), [here](http://stackoverflow.com/questions/36684405/pip-in-crunchbang-error-unicodedecodeerror-utf8-codec-cant-decode-byte-0xb), and [here](http://stackoverflow.com/questions/35427548/unicodedecodeerror-utf8-codec-cant-decode-byte-0x92-in-position-661-invalid).
author:
url:https://github.com/micklat
type:Person
name:micklat
datePublished:2016-08-04T11:17:47.000Z
interactionStatistic:
type:InteractionCounter
interactionType:https://schema.org/CommentAction
userInteractionCount:9
url:https://github.com/719/setuptools/issues/719
context:https://schema.org
headline:"import pkg_resources" fails with UnicodeDecodeError while parsing /usr/lib/pymodules/python2.7/rpl-1.5.5.egg-info
articleBody:My ubuntu has an egg-info that pkg_resources fails to read with a UnicodeDecodeError. This made all sorts of things fail in my virtual environment.
```
> git clone https://github.com/pypa/setuptools
...
> cd setuptools/
> python -c "import pkg_resources"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "pkg_resources/__init__.py", line 2964, in <module>
@_call_aside
File "pkg_resources/__init__.py", line 2950, in _call_aside
f(*args, **kwargs)
File "pkg_resources/__init__.py", line 2977, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "pkg_resources/__init__.py", line 626, in _build_master
ws = cls()
File "pkg_resources/__init__.py", line 619, in __init__
self.add_entry(entry)
File "pkg_resources/__init__.py", line 675, in add_entry
for dist in find_distributions(entry, True):
File "pkg_resources/__init__.py", line 1988, in find_on_path
path_item, entry, metadata, precedence=DEVELOP_DIST
File "pkg_resources/__init__.py", line 2376, in from_location
py_version=py_version, platform=platform, **kw
File "pkg_resources/__init__.py", line 2717, in _reload_version
md_version = _version_from_file(self._get_metadata(self.PKG_INFO))
File "pkg_resources/__init__.py", line 2341, in _version_from_file
line = next(iter(version_lines), '')
File "pkg_resources/__init__.py", line 2509, in _get_metadata
for line in self.get_metadata_lines(name):
File "pkg_resources/__init__.py", line 1879, in get_metadata_lines
return yield_lines(self.get_metadata(name))
File "pkg_resources/__init__.py", line 1869, in get_metadata
metadata = f.read()
File "/usr/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 0xb6 in position 147: invalid start byte in /usr/lib/pymodules/python2.7/rpl-1.5.5.egg-info
```
The problematic egg-info file is attached, with an added extension (txt) to fool github into accepting the attachment.
[rpl-1.5.5.egg-info.txt](https://github.com/pypa/setuptools/files/401454/rpl-1.5.5.egg-info.txt)
This is with python 2.7.2 and setuptools aad4a6913d3e505064c76322d20756909724c411.
To make my virtualenv work properly, I had to patch pkg_resources/**init**.py, replacing the line:
```
md_version = _version_from_file(self._get_metadata(self.PKG_INFO))
```
in EggInfoDistribution._reload_version with this:
```
try:
md_version = _version_from_file(self._get_metadata(self.PKG_INFO))
except UnicodeDecodeError as e:
warnings.warn(
'failure to read version number of %s at %s due to: %s' % (self.project_name, self.location, e))
md_version = None
```
I can make a pull request out of this if you think this is a good solution.
BTW, the stack trace looks similar to that of #531 . You can also see multiple other people running into the same problem on stackoverflow.com, [here](http://stackoverflow.com/questions/34440958/cant-run-pip-unicodedecodeerror), [here](http://stackoverflow.com/questions/36684405/pip-in-crunchbang-error-unicodedecodeerror-utf8-codec-cant-decode-byte-0xb), and [here](http://stackoverflow.com/questions/35427548/unicodedecodeerror-utf8-codec-cant-decode-byte-0x92-in-position-661-invalid).
author:
url:https://github.com/micklat
type:Person
name:micklat
datePublished:2016-08-04T11:17:47.000Z
interactionStatistic:
type:InteractionCounter
interactionType:https://schema.org/CommentAction
userInteractionCount:9
url:https://github.com/719/setuptools/issues/719
Person:
url:https://github.com/micklat
name:micklat
url:https://github.com/micklat
name:micklat
InteractionCounter:
interactionType:https://schema.org/CommentAction
userInteractionCount:9
interactionType:https://schema.org/CommentAction
userInteractionCount:9
External Links {π}(6)
- How much does https://github.blog pull in monthly?
- Financial intake of http://stackoverflow.com/questions/34440958/cant-run-pip-unicodedecodeerror
- http://stackoverflow.com/questions/36684405/pip-in-crunchbang-error-unicodedecodeerror-utf8-codec-cant-decode-byte-0xb's financial summary
- Monthly income for http://stackoverflow.com/questions/35427548/unicodedecodeerror-utf8-codec-cant-decode-byte-0x92-in-position-661-invalid
- https://sourceforge.net/p/rpl/bugs/2/'s revenue stream
- How much profit does https://www.githubstatus.com/ generate?
Analytics and Tracking {π}
- Site Verification - Google
Libraries {π}
- Clipboard.js
- D3.js
- GSAP
- Lodash
Emails and Hosting {βοΈ}
Mail Servers:
- aspmx.l.google.com
- alt1.aspmx.l.google.com
- alt2.aspmx.l.google.com
- alt3.aspmx.l.google.com
- alt4.aspmx.l.google.com
Name Servers:
- dns1.p08.nsone.net
- dns2.p08.nsone.net
- dns3.p08.nsone.net
- dns4.p08.nsone.net
- ns-1283.awsdns-32.org
- ns-1707.awsdns-21.co.uk
- ns-421.awsdns-52.com
- ns-520.awsdns-01.net