L4GSP1KE/Upload-Assistant

Traceback Error

KingMak3r opened this issue · 0 comments

Hey Everyone!

After more than a 100 uploads, I really dont think I could go back to manually uploading again. However, I noticed that some files will generate errors and will fail to upload. This has happened with a number of different files (ranging from a signle movie to a tv season folder). For example, when I run
C:\Users\X\Upload-Assistant>python upload.py C:\Users\X\Downloads\The.Jester.2023.BluRay.1080p.DD5.1.x264-CHD.mkv

Initially runs smoothly and generates:

Output

Gathering info for The.Jester.2023.BluRay.1080p.DD5.1.x264-CHD.mkv 
Searching PTP for: The.Jester.2023.BluRay.1080p.DD5.1.x264-CHD.mkv
Matched release with PTP ID: 1220192
Successfully grabbed description from PTP
Prep material saved to C:\Users\X\Upload-Assistant/tmp/The.Jester.2023.BluRay.1080p.DD5.1.x264-CHD.mkv

Error1

Traceback (most recent call last):
 File "C:\Users\X\Upload-Assistant\upload.py", line 569, in <module>
   asyncio.run(do_the_thing(base_dir))
 File "C:\Users\X\AppData\Local\Programs\Python\Python312\Lib\asyncio\runners.py", line 194, in run
   return runner.run(main)
          ^^^^^^^^^^^^^^^^
 File "C:\Users\X\AppData\Local\Programs\Python\Python312\Lib\asyncio\runners.py", line 118, in run
   return self._loop.run_until_complete(task)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 File "C:\Users\X\AppData\Local\Programs\Python\Python312\Lib\asyncio\base_events.py", line 664, in run_until_complete
   return future.result()
          ^^^^^^^^^^^^^^^
 File "C:\Users\X\Upload-Assistant\upload.py", line 300, in do_the_thing
   await tracker_class.upload(meta)
 File "C:\Users\X\Upload-Assistant\src\trackers\MTV.py", line 70, in upload
   await self.edit_desc(meta)
 File "C:\Users\X\Upload-Assistant\src\trackers\MTV.py", line 177, in edit_desc
   desc.write("[mediainfo]" + mi_dump + "[/mediainfo]\n\n")
 File "C:\Users\X\AppData\Local\Programs\Python\Python312\Lib\encodings\cp1252.py", line 19, in encode
   return codecs.charmap_encode(input,self.errors,encoding_table)[0]
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
UnicodeEncodeError: 'charmap' codec can't encode character '\u7b2c' in position 7974: character maps to <undefined>

Has anyone encountered this error before?

Thanks