Skip to content

Decoding error on license file on macOS #45

@johnthagen

Description

@johnthagen

Same issue as #35 and #37 but on macOS with a standard Python 3 install, not in a docker container.

Tested on 1.16.1.

$ pip-licenses --from=mixed --with-system --format=rst --with-license-file
Traceback (most recent call last):
  File "/Users/user/proj/.tox/licenses/bin/pip-licenses", line 8, in <module>
    sys.exit(main())
  File "/Users/user/proj/.tox/licenses/site-packages/piplicenses.py", line 638, in main
    print(output_string)
  File "/Users/user/proj/.tox/licenses/lib-python/3/encodings/ascii.py", line 22, in encode
    return codecs.ascii_encode(input, self.errors)[0]
UnicodeEncodeError: 'ascii' codec can't encode character '\xa9' in position 167881: ordinal not in range(128)

Python prompt for reference:

$ python
Python 3.6.9 (5da45ced70e5, Oct 09 2019, 19:13:07)
[PyPy 7.2.0 with GCC 4.2.1 Compatible Apple LLVM 10.0.0 (clang-1000.11.45.5)] on darwin
Type "help", "copyright", "credits" or "license" for more information.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions