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

Include path in error message when get_metadata() raises e.g. UnicodeDecodeError #1790

Closed
cjerdonek opened this issue Jun 19, 2019 · 1 comment

Comments

@cjerdonek
Copy link
Member

commented Jun 19, 2019

This issue is another manifestation of issue #1664 ("Include location of bad METADATA files in errors"), but for the value.decode('utf-8') line in NullProvider.get_metadata():

def get_metadata(self, name):
if not self.egg_info:
return ""
value = self._get(self._fn(self.egg_info, name))
return value.decode('utf-8') if six.PY3 else value

This came up recently in this pip issue (and probably other pip issues -- this is just one example): pypa/pip#6566

Rather than re-opening #1664, it probably makes sense to have a new issue. It's unknown to me how many code paths in pkg_resources affect the larger issue. PR #1706 addressed the version-is-missing case.

@cjerdonek

This comment has been minimized.

Copy link
Member Author

commented Jun 28, 2019

I posted a fix for this a week ago here: #1791

@benoit-pierre benoit-pierre referenced this issue Jun 30, 2019

Merged

Fix CI #1795

pganssle added a commit that referenced this issue Jul 13, 2019

Fix #1790 : Include the file path in get_metadata() UnicodeDecodeErro…
…rs (#1791)

Include the file path in get_metadata() UnicodeDecodeErrors.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.