"UnicodeDecodeError: 'charmap' codec can't decode..." setup.py
mahmut-ozdemir opened this issue · 15 comments
Error message: "subprocess-exited-with-error"
The error message "subprocess-exited-with-error" indicates that a subprocess being run by pip has failed. Specifically, in this case, it seems to be related to an issue with the metadata generation of a Python package.
The error message further explains that when attempting to read the long_description element in the setup.py file, a UnicodeDecodeError occurred. This usually happens when the character encoding is not specified correctly.
To resolve this issue, make sure that the character encoding is specified correctly when reading the long_description element in the setup.py file. For instance, if your file is assumed to be encoded with UTF-8, you can use the following code:
with open('README.md', encoding='utf-8') as f: long_description = f.read()
Is there a workaround for this issue? I am currently stuck in running diffuzers due to this. When running the app.
Is there a workaround for this issue? I am currently stuck in running diffuzers due to this. When running the app
Open setup.py and found this code line "with open('README.md.... "
Change it with this
with open('README.md', encoding='utf-8') as f: long_description = f.read()
im running python 3.8 and i dont have this issue.
Yes that I did, but after the installation whenever I try to run the app I get a similar error related, I think, to the same issue:
F:\StableDiffussion\diffuzers> diffuzers app 2023-05-07 21:25:33.199 'charmap' codec can't encode character '\U0001f44b' in position 4: character maps to <undefined>
Interesting, I am currently running python 3.10, will give a try to run it with 3.8 later. Will come back if that works.
3.10 also without issues on my end. are you on windows?
Yes
https://symbl.cc/en/search/?q=%5CU0001f44b
It's wawing hand emoji, you can delete it in the README.md
Thanks, will check tomorrow.
I deleted the emoji from all the readme files I could find related to diffuzers but still no luck, same problem.
Is there a workaround for this issue? I am currently stuck in running diffuzers due to this. When running the app
Open setup.py and found this code line "with open('README.md.... "
Change it with this
with open('README.md', encoding='utf-8') as f: long_description = f.read()
This resolved the issue for me. Coda/Python3.10 on Windows