Please install and use psycopg2. There are known issues with pg8000. 

On Tuesday, 6 February 2018 08:17:51 UTC-6, Simona Chovancová wrote:
>
> solved, ran worker in different application than the task was sent from
>
> On Tuesday, February 6, 2018 at 2:34:24 PM UTC+1, Simona Chovancová wrote:
>>
>> Hello,
>>
>> I'm having trouble using the scheduler. I have managed to set it up to 
>> queue tasks and successfully complete them. Although, that only works if I 
>> do not use database. If I include db in function that is tasked, I get this:
>>
>> Traceback (most recent call last):
>>   File "/srv/www/web2py/gluon/shell.py", line 273, in run
>>     exec(python_code, _env)
>>   File "<string>", line 1, in <module>
>>   File "/srv/www/web2py/gluon/scheduler.py", line 735, in loop
>>     self.wrapped_report_task(task, self.async(task))
>>   File "/srv/www/web2py/gluon/scheduler.py", line 889, in 
>> wrapped_report_task
>>     db.rollback()
>>   File "/srv/www/web2py/gluon/packages/dal/pydal/base.py", line 956, in 
>> rollback
>>     self._adapter.rollback()
>>   File "/srv/www/web2py/gluon/packages/dal/pydal/adapters/base.py", line 
>> 1342, in rollback
>>     return self.connection.rollback()
>>   File "/srv/www/web2py/gluon/contrib/pg8000/core.py", line 1429, in 
>> rollback
>>     self.execute(self._cursor, "rollback", None)
>>   File "/srv/www/web2py/gluon/contrib/pg8000/core.py", line 1626, in 
>> execute
>>     self.handle_messages(cursor)
>>   File "/srv/www/web2py/gluon/contrib/pg8000/core.py", line 1774, in 
>> handle_messages
>>     raise self.error
>> ProgrammingError: ('ERROR', '42P05', 'prepared statement 
>> "pg8000_statement_13" already exists')
>>
>> Also, if I do just simple inserts like db.table.insert(something="abc"), 
>> I also include db.commit(), I get this error:
>>
>> Database drivers available: sqlite3, imaplib, pymysql, pg8000
>> starting single-scheduler for "myapp"...
>> ERROR:web2py.scheduler.servername#3711:    error storing result
>>
>>
>> Can someone please point me to the right direction?
>> Thanks
>>
>

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