I have a Pywikibot - script that adds tens of thousands of files to a category. But when the script gets to a file containing the character \uFFFD, it will stop and say:
"Title contains illegal char (\uFFFD 'REPLACEMENT CHARACTER')"
I believe the script should not stop in such case, but it should simply report such files to an error log. And maybe skip them, but in any case, the script should not stop.
My script is this:
python pwb.py category add -pt:1 -file:yH5.txt -to:"Taken with Sony DSC-H5" -summary:"Bot: Adding category [[:Category:Taken with Sony DSC-H5|Taken with Sony DSC-H5]] using Pywikibot in automatic mode"
And it stops at this file:
[[:commons:File:A Warli painting by Jivya Soma Mashe, Thane district.jpg]]