Adding the line `db._adapter.reconnect()` to the top of the function seems to have solved the problem. Thanks so much for the help.
On Sun, Feb 4, 2018 at 4:02 AM, LoveWeb2py <atayloru...@gmail.com> wrote: > Hi Massimo, > > Thank you for responding. Do you have an example? I am having the same > struggle. > > Thank you again. > > On Sunday, February 4, 2018 at 12:46:08 AM UTC-5, Massimo Di Pierro wrote: >> >> I believe the problem is that pydal is designed to not allow db to be >> shared among multiple threads to avoid concurrency issues. Every thread >> should make its own db object or, if you pass db around, you should call >> db.reconnect in each thread. >> >> On Saturday, 3 February 2018 22:14:41 UTC-6, jbu...@wgu.edu wrote: >>> >>> The attached file contains the code that is generating the error, line 4 >>> specifically is called out in the traceback, but if I comment this line out >>> I get the same error from the next line that is querying the database. If I >>> start a web2py shell, I can copy and paste the offending line into the >>> shell and it returns the expected results, also if I switch the database >>> back to sqlite everything works as expected. >>> >> -- > Resources: > - http://web2py.com > - http://web2py.com/book (Documentation) > - http://github.com/web2py/web2py (Source code) > - https://code.google.com/p/web2py/issues/list (Report Issues) > --- > You received this message because you are subscribed to a topic in the > Google Groups "web2py-users" group. > To unsubscribe from this topic, visit https://groups.google.com/d/ > topic/web2py/iJvGzWEd3pU/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > web2py+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- Jonathan Burkert Student ID: 744966 BS in Data Management and Data Analytics 2017-10-01 Mentor: Tom Grant c 717-318-9998 Eastern jbur...@wgu.edu -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.