raimon49 / pip-licenses

Dump the license list of packages installed with pip.
MIT License
314 stars 45 forks source link

Some packages cause UnicodeDecodeError when attempting to read package info #63

Closed Liam-Deacon closed 4 years ago

Liam-Deacon commented 4 years ago

A workaround solution seems to be add errors='ignore' to the open call for license_file_handle on line 146:

image

raimon49 commented 4 years ago

@Lightslayer Thanks for the suggestion.

In the original implementation was not specify errors='replace', errors argument is no longer in this commit. https://github.com/raimon49/pip-licenses/pull/56/commits/63516663b0a33f7041e37d1b1c0ed459968f536c

I will add ignore orreplace to the argument in the next release.