hooram / ownphotos

Self hosted alternative to Google Photos
MIT License
2.77k stars 232 forks source link

Error while scanning my root folder: 'utf-8' codec can't encode characters... #112

Open a375702 opened 5 years ago

a375702 commented 5 years ago

I got this error in the log: directory_watcher.py : scan_photos : 237 : ERROR : 'utf-8' codec can't encode characters in position 37-42: surrogates not allowed

How can I find out which folder is causing issues? How to fix this?

guysoft commented 5 years ago

You have a folder with a encoding that is not utf-8. You can try scanning only part of the folders to narrow it down, there is no code to return what folder is causing it.

Its happening because of this: https://stackoverflow.com/a/27367173/311268

Perhaps there is a way to replace it. It looks like its only a print