"Error while reading image... likely caused by special characters" but no special characters in filename

If training is failing to start, and you are not receiving an error message telling you what to do, tell us about it here


Forum rules

Read the FAQs and search the forum before posting a new topic.

This forum is for reporting errors with the Training process. If you want to get tips, or better understand the Training process, then you should look in the Training Discussion forum.

Please mark any answers that fixed your problems so others can find the solutions.

Locked
User avatar
ufffd
Posts: 1
Joined: Mon Aug 10, 2020 10:40 pm

"Error while reading image... likely caused by special characters" but no special characters in filename

Post by ufffd »

Any time I run the Train function - using default settings with a fresh new install downloaded today - it runs for a few minutes then gives me an error like this:
"Exception: Error while reading image. This is most likely caused by special characters in the filename: 'C:\Users\kyle\Desktop\faceswaptest\trumpmoments\trumpmoments_003294_0.png'"
The file seems normal to me, doesn't have any special characters (unless you count underscores??) and it also seems to fail on a different image each time. What can I do to troubleshoot? This is my first time running this program :?

User avatar
bryanlyon
Site Admin
Posts: 793
Joined: Fri Jul 12, 2019 12:49 am
Answers: 44
Location: San Francisco
Has thanked: 4 times
Been thanked: 218 times
Contact:

Re: "Error while reading image... likely caused by special characters" but no special characters in filename

Post by bryanlyon »

We're going to need the full crashlog to diagnose fully, but this error sometimes happens when an antivirus or cloud drive (like Dropbox, Google Drive) checkes the files every time we use them. In those situations the image fails to load since it's opened by another program.

User avatar
abigflea
Posts: 182
Joined: Sat Feb 22, 2020 10:59 pm
Answers: 2
Has thanked: 20 times
Been thanked: 62 times

Re: "Error while reading image... likely caused by special characters" but no special characters in filename

Post by abigflea »

I used to get this regularly with a file system corruption, usually NTFS.
Prior I had no idea something was amiss until I got that message.

A quick 'repair file system' in In Windows or Linux would sort it out.
Try that.

:o I dunno what I'm doing :shock:
2X RTX 3090 : RTX 3080 : RTX: 2060 : 2x RTX 2080 Super : Ghetto 1060

User avatar
torzdf
Posts: 2681
Joined: Fri Jul 12, 2019 12:53 am
Answers: 159
Has thanked: 133 times
Been thanked: 625 times

Re: "Error while reading image... likely caused by special characters" but no special characters in filename

Post by torzdf »

If it always fails on the same image (and [mention]abigflea[/mention]'s solution doesn't fix), then most likely that image has got corrupted somehow....

You can either re-extract the faces from the alignments file (with the alignments tool), or just delete that image.

My word is final

Locked