BTW, I tried executing the very same query directly via a cursor created
with db._db_cursor().connection.cursor() and it works so I'm sure the
problem is in web.py's database interface.
El lunes, 18 de agosto de 2014 13:55:39 UTC+2, Joxean Koret escribió:
>
> Hi all,
>
> I have a code that executes some SQL queries using web.py's database
> interface with MySQL and SQLite. With MySQL I have no problem all. Using
> SQLite under Linux, my code works as expected but using MacOSX Maverick a
> call to db.query() returns -1.
>
> The following is an extract of the failing code:
>
> def get_project_engines(self):
> res = self.db.query(""" long SQL query""")
> return res
>
> def generate(self):
> log("Starting generator...")
> while 1:
> (...)
> project_engines = self.get_project_engines()
> for pe in project_engines: <--- Crash here
> # do stuff
> (...)
>
>
>
> The member get_project_engines() simply returns whatever the SQL queries
> returns and then the returned cursor is read in a for. However, the for
> fails (only under MacOSX Mavericks AFAIK) because db.query is returning -1.
> I cannot reproduce this problem at all, for example, with Linux.
>
> Any idea about what is happening?
>
> Thanks!
>
--
You received this message because you are subscribed to the Google Groups
"web.py" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/webpy.
For more options, visit https://groups.google.com/d/optout.