Traceback (most recent call last):
File "C:\Users\nlz\Code\mdownloader\mdownloader.py", line 123, in <module>
beforeMain(args.id, args.language, args.directory, args.type, args.save_format, args.folder, args.covers)
File "C:\Users\nlz\Code\mdownloader\mdownloader.py", line 105, in beforeMain
main(id, language, directory, type, save_format, folder, covers)
File "C:\Users\nlz\Code\mdownloader\components\main.py", line 81, in main
bulkDownloader(id, language, route, type, save_format, make_folder, covers)
File "C:\Users\nlz\Code\mdownloader\components\main.py", line 65, in bulkDownloader
typeChecker(id, language, route, type, save_format, make_folder, covers)
File "C:\Users\nlz\Code\mdownloader\components\main.py", line 18, in typeChecker
downloadBatch(id, language, route, type, save_format, make_folder, covers)
File "C:\Users\nlz\Code\mdownloader\components\downloader.py", line 227, in downloadBatch
downloadChapter(chapter_id, title, route, type, save_format, make_folder, json_file)
File "C:\Users\nlz\Code\mdownloader\components\downloader.py", line 158, in downloadChapter
json_file.core(0)
File "C:\Users\nlz\Code\mdownloader\components\jsonmaker.py", line 249, in core
self.saveJson()
File "C:\Users\nlz\Code\mdownloader\components\jsonmaker.py", line 101, in saveJson
json.dump(self.new_data, json_file, indent=4, ensure_ascii=False)
File "C:\Python39\lib\json\__init__.py", line 180, in dump
fp.write(chunk)
File "C:\Python39\lib\encodings\cp1252.py", line 19, in encode
return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: 'charmap' codec can't encode characters in position 1-3: character maps to <undefined>
Here it fails at writing author of https://mangadex.org/api/v2/title/9012?saver=0, which is in korean.
Looking at the error closely it says cp1252, and I think you cannot do korean characters in this encoding.
Here it fails at writing author of https://mangadex.org/api/v2/title/9012?saver=0, which is in korean. Looking at the error closely it says cp1252, and I think you cannot do korean characters in this encoding.
I think the best solution would be to force UTF8, so here: https://github.com/Rudoal/mdownloader/blob/8164e67d793838810734871cf6e19298fd094b99/components/jsonmaker.py#L100-L101 instead do:
Makes me think that it would've solved Issue #6