I was in the shell (hence the ">>>") when I received this error. Does --timeout=TIMEOUT also apply to the shell?
Richard On Sep 15, 12:10 am, mdipierro <[email protected]> wrote: > You can can increase timeout (web2py.py -h) or, better, use the shell > > python web2py.py -S yourapp -M > > >>> db.export_to_csv_file(open('/path/to/file.csv','wb')) > > On Sep 14, 3:02 am, Richard <[email protected]> wrote: > > > hello, > > > I was trying out the export recipe in ch 6.8 of the manual and > > received a timeout error: > > > >>> fp = open('20090914.db', 'wb') > > >>> db.export_to_csv_file(fp) > > > Traceback (most recent call last): > > File "<console>", line 1, in <module> > > File "/home/web2py/gluon/sql.py", line 1056, in export_to_csv_file > > self(self[table].id > 0).select().export_to_csv_file(ofile) > > File "/home/web2py/gluon/sql.py", line 2212, in select > > r = response(query) > > File "/home/web2py/gluon/sql.py", line 2207, in response > > self._db._execute(query) > > File "/home/web2py/gluon/sql.py", line 770, in <lambda> > > self._execute = lambda *a, **b: self._cursor.execute(*a, **b) > > ProgrammingError: canceling statement due to statement timeout > > > The database is quite big so I guess that is causing the timeout. Is > > there a way to export large databases with web2py? > > > Richard > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py-users" group. 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/web2py?hl=en -~----------~----~----~----~------~----~------~--~---

