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 · Fixed by #1791
Closed

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

cjerdonek opened this issue Jun 19, 2019 · 1 comment · Fixed by #1791

Comments

@cjerdonek
Copy link
Member

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
Copy link
Member Author

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

@benoit-pierre benoit-pierre mentioned this issue Jun 30, 2019
pganssle pushed a commit that referenced this issue Jul 13, 2019
…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
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant