multichill/toollabs

CRITICAL: Exiting due to uncaught exception <class 'PermissionError'>

Opened this issue · 0 comments

VDK commented

when trying to run wikidata_uploader.py I get the error:

File size 1407316 is smaller than 80000000 so not using chunked uploading Traceback (most recent call last): File "C:\Users\VKO010\OneDrive - KB nationale bibliotheek\Documents\scripts\wikidata uploader\wikidata_uploader.py", line 606, in <module> main() File "C:\wikidata_uploader.py", line 603, in main wikidataUploaderBot.run() File "C:\wikidata_uploader.py", line 219, in run self.uploadPainting(metadata) File "C:\wikidata_uploader.py", line 327, in uploadPainting uploadsuccess = self.site.upload(imagefile, source_filename=t.name, report_success=False, comment=comment) File "C:\Python39\lib\site-packages\pywikibot\tools\__init__.py", line 1480, in wrapper return obj(*__args, **__kw) File "C:\Python39\lib\site-packages\pywikibot\site\__init__.py", line 4568, in upload with open(source_filename, 'rb') as f: PermissionError: [Errno 13] Permission denied: 'C:\\Users\\VKO010\\AppData\\Local\\Temp\\tmpk3jzvsy_\' CRITICAL: Exiting due to uncaught exception <class 'PermissionError'>

This is Line 329

I've changed the deprecated "ignore_warnings=True" to "report_success=False"