-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
It fixed the issue, indeed.
So I assume I'll have to review all the executesql's calls in order to add the
fetch parameter to the ones that need it, which, in this case won't be a simple
task :(
What was the problem with the try/except block? Can't see one (at least, not a
PostgreSQL related one)... in which case, perhaps it would be possible to put
the try/except block inside the adapter or somehow test the kind of adapter in
use...
Thanks
Em 03-09-2012 20:17, Massimo Di Pierro escreveu:
> we did remove a try... except in there that would have caused more problems.
>
> Check out latest trunk and try:
>
> db.executesql('truncate auth_event',fetch=False)
>
> else it expect the query to return something.
>
> On Monday, 3 September 2012 14:01:57 UTC-5, Carlos Correia wrote:
>
> Hi,
>
> After updating to trunk (Version 2.0.6 (2012-09-03 10:18:10) stable), I
> started
> getting the following error in executesql():
>
> In [1]: db.executesql( 'truncate auth_event' )
> ---------------------------------------------------------------------------
> ProgrammingError Traceback (most recent call last)
> /home/carlos/development/m16e/apps/web/web2py/clusters/m16e/src/applications/belmiro/models/menu.py
>
> in <module>()
> ----> 1 db.executesql( 'truncate auth_event' )
>
> /home/carlos/development/m16e/apps/web/web2py/clusters/m16e/src/gluon/dal.pyc
> in
>
> executesql(self, query, placeholders, as_dict, fields, colnames)
> 7247 # easier to work with. row['field_name'] rather than
> row[0]
>
> 7248 return [dict(zip(fields,row)) for row in data]
> -> 7249 data = adapter.cursor.fetchall()
> 7250 if fields or colnames:
> 7251 fields = [] if fields is None else fields
>
> ProgrammingError: no results to fetch
>
> Before the upgrade, I was using Version 2.00.0 (2012-08-03 09:01:00) dev
>
> Thanks,
>
> --
>
>
>
- --
Com os melhores cumprimentos,
Carlos Correia
=========================
MEMÓRIA PERSISTENTE, Lda.
Tel.: 219 291 591 - GSM: 917 157 146 / 967 511 762
e-mail: [email protected] - URL: http://www.memoriapersistente.pt
Jabber: [email protected]
GnuPG: wwwkeys.eu.pgp.net
URL Suporte (experimental): https://ky.m16e.com (certificado auto-assinado)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/
iEYEARECAAYFAlBFGu4ACgkQ90uzwjA1SJV72wCePW+A458IwEGmxTF/idSfbnbI
op8AoK0TR7RIEKtY7k+8O6hxSTlXKJuE
=cSKw
-----END PGP SIGNATURE-----
--