I see what you mean now. Yes, that's a limitation of how I designed the card browser to be optimised for speed. I'll see if I can give a less scary message to the user.
Cheers, Peter On Tue, Jun 21, 2022 at 8:50 AM Christoph Gordalla < [email protected]> wrote: > HI Peter, > > with "having the database open", I mean when I opened the "Browse cards" > dialog (Ctrl+B) in the server version of mnemosyne itself. With this > "Browse cards" dialog open, the sync from the client fails and gives the > error message from above. > > Am Di., 21. Juni 2022 um 07:07 Uhr schrieb Peter Bienstman < > [email protected]>: > >> Do you have the database open in another program or in another instance >> of Mnemosyne? It should be no problem if the database you're syncing is >> also the active database of the server. >> >> Also, what exactly do you mean by closing the database? Mnemosyne has no >> function 'close'... >> >> Peter >> >> On Mon, 20 Jun 2022, 21:37 Christoph Gordalla, < >> [email protected]> wrote: >> >>> Hi Peter, >>> >>> I hope that I can also report bugs here. I noticed already for a long >>> time that the sync operation always fails when one tries to sync while the >>> server database is open. Here you will also find the stack trace (on an >>> Ubuntu system): >>> >>> Traceback (innermost last): >>> File >>> "/usr/local/lib/python3.10/dist-packages/Mnemosyne-2.9-py3.10.egg/openSM2sync/server.py", >>> line 326, in put_login >>> session = self.create_session(client_info) >>> File >>> "/usr/local/lib/python3.10/dist-packages/Mnemosyne-2.9-py3.10.egg/openSM2sync/server.py", >>> line 177, in create_session >>> session = Session(client_info, database) >>> File >>> "/usr/local/lib/python3.10/dist-packages/Mnemosyne-2.9-py3.10.egg/openSM2sync/server.py", >>> line 53, in __init__ >>> self.backup_file = self.database.backup() >>> File >>> "/usr/local/lib/python3.10/dist-packages/Mnemosyne-2.9-py3.10.egg/mnemosyne/libmnemosyne/databases/SQLite.py", >>> line 424, in backup >>> self.save() >>> File >>> "/usr/local/lib/python3.10/dist-packages/Mnemosyne-2.9-py3.10.egg/mnemosyne/libmnemosyne/databases/SQLite.py", >>> line 405, in save >>> self.con.commit() >>> File >>> "/usr/local/lib/python3.10/dist-packages/Mnemosyne-2.9-py3.10.egg/mnemosyne/libmnemosyne/databases/_sqlite3.py", >>> line 95, in commit >>> return self.connection.commit() >>> sqlite3.OperationalError: database is locked >>> >>> The error is not the end of the world since one can just fix it by >>> closing the database and syncing again. However, maybe you can catch the >>> exception and give the user a warning that one cannot sync when the >>> database is open. >>> >>> Best regards, >>> >>> Christoph >>> >>> -- >>> 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/c37fc212-693b-45d6-aa65-c6683919f7een%40googlegroups.com >>> <https://groups.google.com/d/msgid/mnemosyne-proj-users/c37fc212-693b-45d6-aa65-c6683919f7een%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/CAMdxoPFE_8X6aqP9z%2B6AfR11viQZxjZj8oMk9B5Zyx8LQtbbRQ%40mail.gmail.com >> <https://groups.google.com/d/msgid/mnemosyne-proj-users/CAMdxoPFE_8X6aqP9z%2B6AfR11viQZxjZj8oMk9B5Zyx8LQtbbRQ%40mail.gmail.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/CAJoM%3D1hBfNFCOOvK6odr0%3D4p-N6t9BnkP%2BngzswYLYmb%3D2Xzgw%40mail.gmail.com > <https://groups.google.com/d/msgid/mnemosyne-proj-users/CAJoM%3D1hBfNFCOOvK6odr0%3D4p-N6t9BnkP%2BngzswYLYmb%3D2Xzgw%40mail.gmail.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/CAMdxoPGW0qMTR4RDFH6tH8crHSPS5vFfOT6rL-%2BpR6KX0JsCGA%40mail.gmail.com.
