Unexpected error occurs when starting mnemosyne headless

133 views
Skip to first unread message

Chris

unread,
Nov 5, 2014, 7:47:05 AM11/5/14
to mnemosyne-...@googlegroups.com
I upgraded to Mnemosyne 2.3.1 and now I get the following error, when starting Mnemosyne in headless mode:

...:~$ mnemosyne --sync-server --web-server
An unexpected error has occurred.
Please forward the following info to the developers:

Traceback (innermost last):
  File "/usr/local/bin/mnemosyne", line 5, in <module>
    pkg_resources.run_script('Mnemosyne==2.3.1', 'mnemosyne')
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 528, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1401, in run_script
    exec(script_code, namespace, namespace)
  File "/usr/local/lib/python2.7/dist-packages/Mnemosyne-2.3.1-py2.7.egg/EGG-INFO/scripts/mnemosyne", line 79, in <module>
  File "build/bdist.linux-x86_64/egg/mnemosyne/libmnemosyne/__init__.py", line 186, in initialise
    self.activate_components()
  File "build/bdist.linux-x86_64/egg/mnemosyne/libmnemosyne/__init__.py", line 264, in activate_components
    self.component_manager.current("config").activate()
  File "build/bdist.linux-x86_64/egg/mnemosyne/libmnemosyne/configuration.py", line 82, in activate
    self.load()
  File "build/bdist.linux-x86_64/egg/mnemosyne/libmnemosyne/configuration.py", line 213, in load
    self[cursor[0]] = eval(cursor[1])
  File "<string>", line 1, in <module>
 AttributeError: 'module' object has no attribute 'QtCore'
An unexpected error has occurred.
Please forward the following info to the developers:

Traceback (innermost last):
  File "/usr/local/bin/mnemosyne", line 5, in <module>
    pkg_resources.run_script('Mnemosyne==2.3.1', 'mnemosyne')
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 528, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1401, in run_script
    exec(script_code, namespace, namespace)
  File "/usr/local/lib/python2.7/dist-packages/Mnemosyne-2.3.1-py2.7.egg/EGG-INFO/scripts/mnemosyne", line 79, in <module>
  File "build/bdist.linux-x86_64/egg/mnemosyne/libmnemosyne/__init__.py", line 186, in initialise
    self.activate_components()
  File "build/bdist.linux-x86_64/egg/mnemosyne/libmnemosyne/__init__.py", line 264, in activate_components
    self.component_manager.current("config").activate()
  File "build/bdist.linux-x86_64/egg/mnemosyne/libmnemosyne/configuration.py", line 82, in activate
    self.load()
  File "build/bdist.linux-x86_64/egg/mnemosyne/libmnemosyne/configuration.py", line 213, in load
    self[cursor[0]] = eval(cursor[1])
  File "<string>", line 1, in <module>
 AttributeError: 'module' object has no attribute 'QtCore'

This error didn't occur with Mnemosyne 2.3, only after the upgrade to Mnemosyne 2.3.1.
The system is Ubuntu 14.04.
I also deleted the config directory (~/.config/mnemosyne) but this didn't solve the problem.

Peter Bienstman

unread,
Nov 5, 2014, 8:00:30 AM11/5/14
to mnemosyne-...@googlegroups.com
Hi,

Are you sure you've deleted config.db and config? There seems to be still a Qt object stored in the configuration database which is being picked up.

Peter
> x86_64/egg/mnemosyne/libmnemosyne/configuration.py", line 213, in load
> self[cursor[0]] = eval(cursor[1])
> File "<string>", line 1, in <module>
> AttributeError: 'module' object has no attribute 'QtCore'
>
>
> This error didn't occur with Mnemosyne 2.3, only after the upgrade to
> Mnemosyne 2.3.1.
> The system is Ubuntu 14.04.
> I also deleted the config directory (~/.config/mnemosyne) but this didn't
> solve the problem.
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "mnemosyne-proj-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to mnemosyne-proj-u...@googlegroups.com.
> To post to this group, send email to mnemosyne-proj-
> us...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/mnemosyne-proj-users/ec32e3dd-
> 7607-4be2-b997-8afd8b3b8501%40googlegroups.com
> <https://groups.google.com/d/msgid/mnemosyne-proj-users/ec32e3dd-
> 7607-4be2-b997-
> 8afd8b3b8501%40googlegroups.com?utm_medium=email&utm_source=foo
> ter> .
> For more options, visit https://groups.google.com/d/optout.


na...@online.de

unread,
Nov 5, 2014, 8:03:03 AM11/5/14
to mnemosyne-...@googlegroups.com
I deleted the whole config directory ~/.config/mnemosyne so both
config.db and config where deleted.

Is there any other directory to consider?


Am 05.11.2014 um 14:00 schrieb Peter Bienstman:
> Hi,
>
> Are you sure you've deleted config.db and config? There seems to be still a Qt object stored in the configuration database which is being picked up.
> ~

Peter Bienstman

unread,
Nov 5, 2014, 8:05:33 AM11/5/14
to mnemosyne-...@googlegroups.com
Your current working directory is not a directory called 'mnemosyne' by any chance? Otherwise it will put its config there to be compatible with running from an usb key.

Otherwise, please mail me config.db and verify that config does not get created after starting the program.

Cheers,
> users+un...@googlegroups.com.
> >> To post to this group, send email to mnemosyne-proj-
> >> us...@googlegroups.com.
> >> To view this discussion on the web visit
> >> https://groups.google.com/d/msgid/mnemosyne-proj-users/ec32e3dd-
> >> 7607-4be2-b997-8afd8b3b8501%40googlegroups.com
> >> <https://groups.google.com/d/msgid/mnemosyne-proj-users/ec32e3dd-
> >> 7607-4be2-b997-
> >>
> 8afd8b3b8501%40googlegroups.com?utm_medium=email&utm_source=foo
> >> ter> .
> >> For more options, visit https://groups.google.com/d/optout.
> >
>
> --
> You received this message because you are subscribed to the Google Groups
> "mnemosyne-proj-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to mnemosyne-proj-u...@googlegroups.com.
> To post to this group, send email to mnemosyne-proj-
> us...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/mnemosyne-proj-
> users/545A2003.4040702%40online.de.

Peter Bienstman

unread,
Nov 5, 2014, 9:43:27 AM11/5/14
to mnemosyne-...@googlegroups.com
I'm rather flabbergasted: your config.db contains e.g.

PyQt4.QtCore.QByteArray('\x01\xd9\xd0\xcb\x00\x01\x00\x00\x00\x00\x02N\x00\x00\x01\x86\x00\x00\x04i\x00\x00\x03\xa3\x00\x00\x02X\x00\x00\x01\xac\x00\x00\x04_\x00\x00\x03\x99\x00\x00\x00\x00\x00\x00') for the key 'configuration_dlg_state', which indicates a system where you've already opened the configuration dialog.

The default value for this key upon creation is hard coded to 'None', so I don't see any way the key could have gotten the value it did, especially since you don't seem to have Qt installed on your headless server.

Just to make absolutely sure you're not picking up any old file from a different system, try the following experiment

mnemosyne --sync-server --web-server -d a_completely_new_and_empty_dir

In that case, Mnemosyne will create a new database and config in a_completely_new_and_empty_dir

Also feel free to run a find command on your entire filesytem and delete any 'config', 'config.py' and 'config.db' files you can find.

Cheers,

Peter

Peter


> -----Original Message-----
> From: mnemosyne-...@googlegroups.com [mailto:mnemosyne-
> proj-...@googlegroups.com] On Behalf Of na...@online.de
> Sent: 05 November 2014 14:03
> To: mnemosyne-...@googlegroups.com
> users+un...@googlegroups.com.
> >> To post to this group, send email to mnemosyne-proj-
> >> us...@googlegroups.com.
> >> To view this discussion on the web visit
> >> https://groups.google.com/d/msgid/mnemosyne-proj-users/ec32e3dd-
> >> 7607-4be2-b997-8afd8b3b8501%40googlegroups.com
> >> <https://groups.google.com/d/msgid/mnemosyne-proj-users/ec32e3dd-
> >> 7607-4be2-b997-
> >>
> 8afd8b3b8501%40googlegroups.com?utm_medium=email&utm_source=foo
> >> ter> .
> >> For more options, visit https://groups.google.com/d/optout.
> >
>
> --
> You received this message because you are subscribed to the Google Groups
> "mnemosyne-proj-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to mnemosyne-proj-u...@googlegroups.com.
> To post to this group, send email to mnemosyne-proj-
> us...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/mnemosyne-proj-
> users/545A2003.4040702%40online.de.

na...@online.de

unread,
Nov 5, 2014, 4:21:34 PM11/5/14
to mnemosyne-...@googlegroups.com
Some more info in addition to the email:

I tested this also on a fresh installation of Ubuntu 14.04 within a
virtual machine. After installation of Mnemosyne 2.3.1 I tested the
following command sequence:

1. mnemosyne --sync-server --web-server
2. mnemosyne
3. mnemosyne --sync-server --web-server
4. mnemosyne

Commands 1, 2, and 4 worked without an error, but with the 3rd command
the same error occured as before. So it doesn't seem to be possible to
run Mnemosyne headless after running Mnemosyne GUI once. But Mnemosyne
with GUI works with web server and sync server enabled.

Cheers,
Chris

Peter Bienstman

unread,
Nov 7, 2014, 3:15:44 PM11/7/14
to mnemosyne-...@googlegroups.com
I've committed a fix for this to launchpad (file mnemosyne/libmnemosyne/configuration.py). If you want a full tarball, just let me know.

Cheers,

Peter
>>>> To post to this group, send email to mnemosyne-proj-
>>>> us...@googlegroups.com.
>>>> To view this discussion on the web visit
>>>> https://groups.google.com/d/msgid/mnemosyne-proj-users/ec32e3dd-
>>>> 7607-4be2-b997-8afd8b3b8501%40googlegroups.com
>>>> <https://groups.google.com/d/msgid/mnemosyne-proj-users/ec32e3dd-
>>>> 7607-4be2-b997-
>>>>
>> 8afd8b3b8501%40googlegroups.com?utm_medium=email&utm_source=foo
>>>> ter> .
>>>> For more options, visit https://groups.google.com/d/optout.
>> --
>> You received this message because you are subscribed to the Google Groups
>> "mnemosyne-proj-users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an

Chris

unread,
Nov 8, 2014, 11:04:32 AM11/8/14
to mnemosyne-...@googlegroups.com
Thanks! Works well now.
Reply all
Reply to author
Forward
0 new messages