apkcache compatibility
If the command fdroid update -v
is executed on Python 3, while old ./tmp/apkcache
is present, the following error happens:
DEBUG: Reading config.py
CRITICAL: Unknown exception found!
Traceback (most recent call last):
File "/usr/bin/fdroid", line 147, in <module>
main()
File "/usr/bin/fdroid", line 124, in main
mod.main()
File "/usr/lib/python3.5/site-packages/fdroidserver/update.py", line 1211, in main
apkcache = pickle.load(cf)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 7: ordinal not in range(128)
You may want to add something like the following code block as a fallback. 'utf-8' works for me, but I don't really know which encodings different pickle
versions use.
apkcache = pickle.load(cf, encoding='utf-8')