Sorry, I messed up. Try: if hasattr(self, method) and callable(getattr(self, method)):
Peter On Wed, Dec 15, 2021 at 8:25 PM Martin Brodbeck <[email protected]> wrote: > 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 schrieb am Mittwoch, 15. Dezember 2021 um 09:28:48 UTC+1: > >> 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 >> >> On Wed, 15 Dec 2021, 06:35 Martin Brodbeck, <[email protected]> wrote: >> >>> 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 schrieb am Dienstag, 14. Dezember 2021 um 21:57:43 UTC+1: >>> >>>> Also, I noticed you are using Python 3.10, but not all libraries >>>> support this yet. Better use 3.9. >>>> >>>> Peter >>>> >>>> On Tue, 14 Dec 2021, 21:54 Peter Bienstman, <[email protected]> >>>> wrote: >>>> >>>>> 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 >>>>> >>>>> On Tue, 14 Dec 2021, 21:49 Martin Brodbeck, <[email protected]> wrote: >>>>> >>>>>> 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 >>>>>> >>>>>> -- >>>>>> 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 [email protected]. >>>>>> To view this discussion on the web visit >>>>>> https://groups.google.com/d/msgid/mnemosyne-proj-users/2080e0ff-a9a5-43df-bce4-4856430feea6n%40googlegroups.com >>>>>> <https://groups.google.com/d/msgid/mnemosyne-proj-users/2080e0ff-a9a5-43df-bce4-4856430feea6n%40googlegroups.com?utm_medium=email&utm_source=footer> >>>>>> . >>>>>> >>>>> -- >>> 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 [email protected]. >>> >> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/mnemosyne-proj-users/2fde95dc-c525-4e45-a4f1-a51f7e701f07n%40googlegroups.com >>> <https://groups.google.com/d/msgid/mnemosyne-proj-users/2fde95dc-c525-4e45-a4f1-a51f7e701f07n%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> >> -- > 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 [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/mnemosyne-proj-users/5bf53f17-4554-433d-837c-8fd2ac40f5a5n%40googlegroups.com > <https://groups.google.com/d/msgid/mnemosyne-proj-users/5bf53f17-4554-433d-837c-8fd2ac40f5a5n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/mnemosyne-proj-users/CAMdxoPE8m6QD3JYZNBiprrH513pr4Ck0fxTNGYnXu3HLkCZuvg%40mail.gmail.com.
