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

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe7 | pillow 8.4.0 #5865

Closed
thachdo opened this issue Dec 3, 2021 · 8 comments · Fixed by #5870
Closed

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe7 | pillow 8.4.0 #5865

thachdo opened this issue Dec 3, 2021 · 8 comments · Fixed by #5870

Comments

@thachdo
Copy link

thachdo commented Dec 3, 2021

  • OS: ubuntu 18.04
  • Python: 3.6
  • Pillow: 8.4.0
    I got the following error while installing 8.4.0:
    writing manifest file 'src/Pillow.egg-info/SOURCES.txt'
    running build_ext
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-68m6eqt_/pillow/setup.py", line 1024, in <module>
        zip_safe=not (debug_build() or PLATFORM_MINGW),
      File "/home/thachdo/.local/lib/python3.6/site-packages/setuptools/__init__.py", line 153, in setup
        return distutils.core.setup(**attrs)
      File "/usr/lib/python3.6/distutils/core.py", line 148, in setup
        dist.run_commands()
      File "/usr/lib/python3.6/distutils/dist.py", line 955, in run_commands
        self.run_command(cmd)
      File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/home/thachdo/.local/lib/python3.6/site-packages/setuptools/command/install.py", line 68, in run
        return orig.install.run(self)
      File "/usr/lib/python3.6/distutils/command/install.py", line 589, in run
        self.run_command('build')
      File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/usr/lib/python3.6/distutils/command/build.py", line 135, in run
        self.run_command(cmd_name)
      File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/home/thachdo/.local/lib/python3.6/site-packages/setuptools/command/build_ext.py", line 79, in run
        _build_ext.run(self)
      File "/usr/lib/python3.6/distutils/command/build_ext.py", line 339, in run
        self.build_extensions()
      File "/tmp/pip-build-68m6eqt_/pillow/setup.py", line 554, in build_extensions
        for dirname in _find_library_dirs_ldconfig():
      File "/tmp/pip-build-68m6eqt_/pillow/setup.py", line 189, in _find_library_dirs_ldconfig
        data = data.decode()
    in position 46: invalid continuation byte
@radarhere
Copy link
Member

radarhere commented Dec 3, 2021

0xe7 is ç. I'm guessing that you have that in a path on your filesystem? Maybe in the name of your home directory?

If I'm right, could you copy and paste one such path here?

@radarhere
Copy link
Member

I've created PR #5870 to fix this. Would you mind testing it?

@thachdo
Copy link
Author

thachdo commented Dec 5, 2021

Thanks, I haven't tested the PR, but I could resolve this issue by upgrading the setuptools.

@thachdo thachdo closed this as completed Dec 5, 2021
@hugovk
Copy link
Member

hugovk commented Dec 5, 2021

@thachdo Good to hear, do you know what versions of setuptools you had before and now?

@thachdo
Copy link
Author

thachdo commented Dec 5, 2021

Not sure before but now is '59.4.0'

@hugovk
Copy link
Member

hugovk commented Dec 5, 2021

Thanks, I guess it could have been a bit old if Python 3.6 is being used (by the way, 3.6 is EOL this month and is dropped in the next Pillow release). Systems with Python 3.7 are likely to have newer setuptools.

Maybe we don't need #5870 seeing as updating setuptools fixed it, depending on how old setuptools was.

But it's probably good to fix anyway.

Do we know what character caused the problem? I'm guessing a non-ASCII character from the path?

@thachdo
Copy link
Author

thachdo commented Dec 5, 2021

0xe7 is ç. I'm guessing that you have that in a path on your filesystem? Maybe in the name of your home directory?

If I'm right, could you copy and paste one such path here?

My home path: /home/thachdo

@radarhere
Copy link
Member

#5870 has now been merged.

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.

3 participants