Hello,

We are trying to use PyDAL 17.11 on a PostgreSQL database in combination 
with falcon on gunicorn. When we instantiate the db connection in the 
on_get or on_post methods it is successful. Now we want to minimize the 
number of db connections by instantiating the connection in the __init__ of 
the class containing the on_get/on_post methods but this results in an 
attribute error; AttributeError '_thread._local' object has no attribute 
'_pydal_connection_somerandomnumber'. We can't seem to find out how and why 
this is happening.

We are using Python 3.6 and we have tried using pg8000 1.12.4 and 
psycopg2(-binary) 2.7.6.1 as drivers.

Can anyone please tell me what we are doing wrong or which information they 
are missing to successfully answer our question.

Thanks in advance!
kvanzuijlen

-- 



E-mail disclaimer Nederlands
De informatie opgenomen in dit bericht kan 
vertrouwelijk zijn en is uitsluitend bestemd voor de geadresseerde. Indien 
u dit bericht onterecht ontvangt, wordt u verzocht de inhoud niet te 
gebruiken, te openbaren, te distribueren of te verveelvoudigen en de 
afzender direct te informeren door het bericht te retourneren en het 
bericht daarna te vernietigen. Shopping Minds b.v. is niet aansprakelijk 
voor de juiste en volledige overbrenging van de inhoud van e-mails, noch 
voor tijdige ontvangst daarvan. Shopping Minds b.v. kan niet garanderen dat 
een verzonden e-mail vrij is van virussen, noch dat e-mails worden 
overgebracht zonder inbreuk of tussenkomst van  onbevoegde derden.
 
E-mail 
disclaimer English
The information contained in this message may be confi 
dential and is intended to be exclusively for the addressee. Should you 
receive this message unintentionally, please do not use, disclose, 
distribute or multiply the contents herein and notify the sender 
immediately by return e-mail and delete this message thereafter. Shopping 
Minds b.v. is neither liable for the proper and complete transmission of 
the information contained in this e-mail message nor for any delay in its 
receipt. Shopping Minds b.v. does not guarantee that the integrity of this 
communication has been maintained nor that the communication is free of 
viruses, interceptions or interference by third parties.





The 
information contained in this message may be confidential and legally 
protected under applicable law. The message is intended solely for the 
addressee(s). If you are not the intended recipient, you are hereby 
notified that any use, forwarding, dissemination, or reproduction of this 
message is strictly prohibited and may be unlawful. If you are not the 
intended recipient, please contact the sender by return e-mail and destroy 
all copies of the original message.

-- 
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.

Reply via email to