UnicodeEncodeError - what am I doing wrong? FIX ? #24

Open
opened 2021-06-27 22:16:46 +02:00 by AlonDan · 8 comments
AlonDan commented 2021-06-27 22:16:46 +02:00 (Migrated from github.com)

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:
cmd_2021-06-27_23-14-28

Can somebody please guide me step-by-step how to fix that?
Thanks ahead!

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: ![cmd_2021-06-27_23-14-28](https://user-images.githubusercontent.com/21152334/123558188-a6033f00-d79d-11eb-985b-9b14070fc389.png) Can somebody please guide me step-by-step how to fix that? Thanks ahead!
woctezuma commented 2021-06-27 23:06:45 +02:00 (Migrated from github.com)

Maybe your pre-trained model is corrupted, because of a quota issue, similarly to #16.

Maybe your pre-trained model is corrupted, because of a quota issue, similarly to #16.
AlonDan commented 2021-06-27 23:18:47 +02:00 (Migrated from github.com)

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 ?

> 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** ?
woctezuma commented 2021-06-27 23:25:19 +02:00 (Migrated from github.com)

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.

> 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.
AlonDan commented 2021-06-27 23:30:39 +02:00 (Migrated from github.com)

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?

> > 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?
AlonDan commented 2021-06-27 23:43:20 +02:00 (Migrated from github.com)

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 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. :)
woctezuma commented 2021-06-28 07:10:25 +02:00 (Migrated from github.com)

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 of SimSwap.

Are you using Python 3?

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 of `SimSwap`. Are you using Python 3?
AlonDan commented 2021-06-28 07:15:37 +02:00 (Migrated from github.com)

I am glad you fixed the issue, but the file which you mentioned is part of your Python installation, so it is not an issue with the code of SimSwap. 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) 😅

> I am glad you fixed the issue, but the file which you mentioned is part of your Python installation, so it is not an issue with the code of `SimSwap`. Are you using Python 3? I followed copy-past all the steps from the [official guide](https://github.com/neuralchen/SimSwap/blob/main/docs/guidance/preparation.md), so it's 3.6 I think ? well at least it works after my weird messing-around (consider I'm clueless in this area) 😅
vinesmsuic commented 2021-07-03 21:09:19 +02:00 (Migrated from github.com)

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... -> Tick Beta: Use Unicode UTF-8 for worldwide language support -> Restart the computer

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...` -> Tick `Beta: Use Unicode UTF-8 for worldwide language support` -> Restart the computer
Sign in to join this conversation.