-
Notifications
You must be signed in to change notification settings - Fork 86
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: 'charmap' codec can't decode..." setup.py #23
Comments
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
|
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: |
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. |
This resolved the issue for me. Coda/Python3.10 on Windows |
Where am I supposed to put this line? Propably a really stupid question, but I don't really use python all to often. Just out of desperation I also ran a powershell command to remove all occurences of 👋 from all .txt and .md files in my python 3.11 folder, which didn't fix anything either... I tried Python 3.7 and 3.10 through Anaconda, where I installed diffuzers via pip. And now I am using Pyhton 3.11 without Anaconda and installed diffuzers via git (on windows). |
You can found it in setup.py. starting with "with open('README.md',..." in the code change this line. |
Thanks, but it still doesn't work... I changed it for reading requirements.txt aswell, but it didnt help (yes I reinstalled it after changing the code). The comment I am quoting is the exact error I get. |
Ok, so I just figured it out. For some weird reason, the command prompt/powershell window isn't allowed to be admin. If I run the command from a normal cmd prompt it appears to work... |
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()
The text was updated successfully, but these errors were encountered: