Dear Maintainer,
after having upgraded mnemosyne from version 2.2.1-3 to 2.4-0.1 the
program refused to start and showed a python exception:
Traceback (innermost last):
File "/usr/bin/mnemosyne", line 229, in <module>
debug_file=options.debug_file)
File
"/usr/lib/python3/dist-packages/mnemosyne/libmnemosyne/__init__.py",
line 190, in initialise
Upgrade3(self.component_manager).run()
File
"/usr/lib/python3/dist-packages/mnemosyne/libmnemosyne/upgrades/upgrade3.py",
line 21, in run
file(os.path.join(self.config().config_dir, "config"), "rb")
NameError: name 'file' is not defined
I started to debug the file
/usr/lib/python3/dist-packages/mnemosyne/libmnemosyne/upgrades/upgrade3.py
where the excecption arose, and found a couple of issues:
* the upgrade mechanism used the python2-built-in "file" that was
removed in python3 (I changed that to the replacement "open"): this was
the original bug that I had observed.
* the encoding was set to the default "ASCII" but was unable to parse
non-ASCII strings in my configuration file (I changed that to latin1)
* the configuration updater then wants to load pyqt4, which was not
installed
* pyqt4 refused to load as pyqt5 was already loaded
(I stopped debugging here)
My workaround: I deleted the configuration diretory ~/.config/mnemosyne.
The database of mnemosyne was not affacted by this as it is stored in
~/.local/share/mnemosyne/. As far as I can tell, I did not lose any data
(except some minor important settings). All cards and also statistics
etc. seem to be intact, and there are no encoding errors.
Thanks!