So, I tried to convert the anki apkgs file to xml by anki2sm program(GitHub - anki2smArchive/anki2sm: Anki2 to SuperMemo 17/18 collection converter), and when I tried to export my anki deck to apkgs file, then try to convert it, some error occurred:
Traceback (most recent call last):
File "C:\anki2sm-master\anki2smV2.py", line 852, in <module>
main()
File "C:\anki2sm-master\anki2smV2.py", line 807, in main
start_import(mypath + apkgfiles[I])
File "C:\anki2sm-master\anki2smV2.py", line 457, in start_import
media = unpack_media(p)
File "C:\anki2sm-master\anki2smV2.py", line 181, in unpack_media
m = json.loads(f.read())
File "C:\Users\a1\AppData\Local\Programs\Python\Python39\lib\codecs.py", line 322, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb5 in position 1: invalid start byte
Press any key to continue . . .
Then I try to extract the apkgs file by rename it to .zip to see if the “media” file whether is json or UTF-8 encoding or not, then there’s only completely random words there
Like this:
But if I export the apkgs from a language learning software (lookupper) instead of anki, the file is normal and the process is fine and without any error, so I think the error came from my anki. I tried to
- check the database and check the media
- reinstall anki ( I don’t completely delete the deck file though)
- update anki
- simpler deck to export
- I tried to switch to safe mode( seemingly switched)
All those just doesn’t work.
Anki Version 25.02.6 (6381f184)
Python 3.9.18 Qt 6.6.2 PyQt 6.6.1
Mac OS: 15.3 (24D60)
Grateful for any help.