diffuzers
diffuzers copied to clipboard
"UnicodeDecodeError: 'charmap' codec can't decode..." setup.py
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
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
Where am I supposed to put this line?
Propably a really stupid question, but I don't really use python all to often.
Also I ran the README.md in the github though this website to remove all non-ascii characters, which allowed me to install diffuzers in the first place (I installed it via git and the error was referencing some other character). Now I get the error again when running diffuzers run (This time with the exact char dicussed in the thread).
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).
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
Where am I supposed to put this line?
Propably a really stupid question, but I don't really use python all to often. Also I ran the README.md in the github though this website to remove all non-ascii characters, which allowed me to install diffuzers in the first place (I installed it via git and the error was referencing some other character). Now I get the error again when running
diffuzers run(This time with the exact char dicussed in the thread).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.
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>
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...