UnicodeEncodeError - what am I doing wrong? FIX ? #24
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I've installed on Windows using Anaconda and when trying to run my first demo using: "Face swapping for video" command with the default demo files.
I get these errors:

Can somebody please guide me step-by-step how to fix that?
Thanks ahead!
Maybe your pre-trained model is corrupted, because of a quota issue, similarly to #16.
Thanks for trying to help, I appreciate it.
I've downloaded successfully the models, they are full size and I don't think they're corrupted because I also downloaded from the other source (just in case)
so I believe that this is not the problem...
Any other ideas how to fix that UnicodeEncodeError ?
The error message is similar to #9 and #10 (failure of
torch.load(netArc_checkpoint)), but it is not the exact same error.Not sure if it helps, I'm not using Colab I use Anaconda + Windows 10
I've looked around google since I have no clue about these stuff I'm not a programmer.
But it seems like that UnicodeEncodeError is related to the coded / decoded of the characters or something, My windows runs on English so I'm not sure if's related but I think that is not a runtime error like the examples you gave above or colab either.
Did anyone ran into this UnicodeEncodeError also? maybe they have the solution or how can I fix it?
I Think I was able to fix it, but maybe the developers would like to have a look on this or add this to the documents (please consider I'm a noob with no experience in programing or anything)
SOLUTION: (temporary until it will be fixed on future versions)
I was just looking around google until I found this solution:
Instead of using "cp1255.py" as the code point on the issue related to Unicode characters..
I made a copy from: "cp65001.py" and renamed it to "cp1255.py" so it actually uses cp65001.py but I didn't touch the code.
Now it works, I have no idea why, I'm totally clueless.. but it works now (at least I don't get the error and I see the progress bar starting with the percentage)
I hope this helps, but probably will be better if it will be fixed in the original source code for future downloads. :)
I am glad you fixed the issue.
However, please note that the file which you mentioned is part of your Python installation (more precisely, the virtual environment which you created for
SimSwap), so it is not an issue with the code ofSimSwap.Are you using Python 3?
I followed copy-past all the steps from the official guide, so it's 3.6 I think ?
well at least it works after my weird messing-around (consider I'm clueless in this area) 😅
You can set UTF-8 in Windows 10 Settings.
Go to
Control Panel\Clock and Region->Change date, time, or number formats-> Administrative ->Change system locate...-> TickBeta: Use Unicode UTF-8 for worldwide language support-> Restart the computer