unable to sync with android app

34 views
Skip to first unread message

Martin Brodbeck

unread,
Dec 14, 2021, 3:49:00 PM12/14/21
to mnemosyne-proj-users
Hello all,

out of nowhere, I'm unable to sync with the android app. Until yesterday, everything was fine. Now, mnemosyne shows me an exception:
--- snip ---
Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
AttributeError("module 'collections' has no attribute 'Callable'")
Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/cheroot/server.py", line 1287, in communicate
    req.respond()
  File "/usr/lib/python3.10/site-packages/cheroot/server.py", line 1077, in respond
    self.server.gateway(self).respond()
  File "/usr/lib/python3.10/site-packages/cheroot/wsgi.py", line 140, in respond
    response = self.req.server.wsgi_app(self.env, self.start_response)
  File "/usr/lib/python3.10/site-packages/openSM2sync/server.py", line 115, in wsgi_app
    status, method, args  = self.get_method(environ)
  File "/usr/lib/python3.10/site-packages/openSM2sync/server.py", line 168, in get_method
    if hasattr(self, method) and isinstance(getattr(self, method), collections.Callable):
AttributeError: module 'collections' has no attribute 'Callable'
--- snip ---

I'm using Arch Linux here, by the way. So everyting should be up-to-date. What can I do? I did some learning on the smartphone, so I would like to sync without loosing data.

Thanks a lot,
Martin

Peter Bienstman

unread,
Dec 14, 2021, 3:54:29 PM12/14/21
to mnemosyne-proj-users
Hi, 

Is the problem reproducible, i.e. does it occur every time?

The error is coming from cheroot, a library Mnemosyne is using for its server code. Did you update that library recently? Does going back to a previous cheroot version help?

Peter 

--
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 view this discussion on the web visit https://groups.google.com/d/msgid/mnemosyne-proj-users/2080e0ff-a9a5-43df-bce4-4856430feea6n%40googlegroups.com.

Peter Bienstman

unread,
Dec 14, 2021, 3:57:43 PM12/14/21
to mnemosyne-proj-users
Also, I noticed you are using Python 3.10, but not all libraries support this yet. Better use 3.9.

Peter 

Martin Brodbeck

unread,
Dec 15, 2021, 12:35:25 AM12/15/21
to mnemosyne-proj-users
Yes. the problem is reproducible.

Hmm, the update to python 3.10 was three weeks ago (and 3.10.1 a three days), and until yesterday, everything was fine. Anyway, going back is not so easy since I accidentially deleted older packages. :)

Peter Bienstman

unread,
Dec 15, 2021, 3:28:48 AM12/15/21
to mnemosyne-proj-users
Perhaps you only restarted the Mnemosyne process yesterday?

Anyway, let's try a workaround: can you in line 168 of /usr/lib/python3.10/site-packages/openSM2sync/server replace

if hasattr(self, method) and isinstance(getattr(self, method), collections.Callable):

by

if hasattr(self, method) and callable(self.method):

Peter

Martin Brodbeck

unread,
Dec 15, 2021, 2:25:10 PM12/15/21
to mnemosyne-proj-users
In fact I killed the mnemosyne process manually multiple times. :)

The workaround didn't work, sorry. The new message is:
--- snip ---
AttributeError("'ServerThread' object has no attribute 'method'")

Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/cheroot/server.py", line 1287, in communicate
    req.respond()
  File "/usr/lib/python3.10/site-packages/cheroot/server.py", line 1077, in respond
    self.server.gateway(self).respond()
  File "/usr/lib/python3.10/site-packages/cheroot/wsgi.py", line 140, in respond
    response = self.req.server.wsgi_app(self.env, self.start_response)
  File "/usr/lib/python3.10/site-packages/openSM2sync/server.py", line 115, in wsgi_app
    status, method, args  = self.get_method(environ)
  File "/usr/lib/python3.10/site-packages/openSM2sync/server.py", line 168, in get_method
    if hasattr(self, method) and callable(self.method):
AttributeError: 'ServerThread' object has no attribute 'method'
--- snip ---

Best regards,
Martin

P.S.: If this only affects me… don't put so much effort into this issue.

Peter Bienstman

unread,
Dec 15, 2021, 3:36:27 PM12/15/21
to mnemosyne-proj-users
Sorry, I messed up. Try:

if hasattr(self, method) and callable(getattr(self, method)):

Peter



Martin Brodbeck

unread,
Dec 15, 2021, 3:55:40 PM12/15/21
to mnemosyne-proj-users
Thanks, Peter! That worked and sync was successful.
Reply all
Reply to author
Forward
0 new messages