If your library is not thread safe, then you may init object in application processor and store it in web.ctx. http://webpy.org/cookbook/application_processors
On Saturday, October 13, 2012 7:16:42 PM UTC+4, Dan Shechter wrote: > > This is turning into a blog... I found a workaround but I would like to > understand why it failed in the first place. > > The workaround was to recreate the object holding the sqlite object each > time before issuing a function which uses sqlite. Its ugly, but it works. > > On Saturday, October 13, 2012 5:01:48 PM UTC+2, Dan Shechter wrote: >> >> Hi All, >> >> I have a library which is using sqlite, and I want to use it inside my >> web.py server. >> >> When trying to use sqlite I get the following error: >> >> ProgrammingError: SQLite objects created in a thread can only be used in >> that same thread. >> >> Any ideas what to do? >> >> Thanks, >> Dan >> > -- You received this message because you are subscribed to the Google Groups "web.py" group. To view this discussion on the web visit https://groups.google.com/d/msg/webpy/-/BOvxV_oXszkJ. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/webpy?hl=en.
