Did you install psycopg2? If not it is probably using pg8000. Can you 
please help us debug? Edit dal.py and in the function log_excecute can you 
print the value of the command variable? What does it print when it fails?

On Wednesday, 5 September 2012 11:29:42 UTC-5, Christian Espinoza wrote:
>
> Hello, I'm in trouble with a webapp that I'have.
>
> I develop it using sqlite only for a best approach of web2py features with 
> it.
>
> And I'm trying to migrate it to a Postgresql DB to put it on Testing phase.
>
> But It doesn't work with PostgreSQL, only work with sqlite, I'd tried with 
>  1.99.7 - 2.0.6 -  2.0.7 Versions
>
> At 2.0.7 and 2.0.6 showme: <type 'exceptions.ValueError'> invalid literal 
> for int() with base 10: 'SELECT'
>
> At 
>
> Traceback (most recent call last):
>   File "/opt/web-apps/web2py/gluon/restricted.py", line 209, in restricted
>     exec ccode in environment
>   File "/opt/web-apps/web2py-2.0.7/applications/sadma/models/db.py" 
> <https://172.16.1.34/admin/default/edit/sadma/models/db.py>, line 236, in 
> <module>
>     if db(db.auth_user).isempty():
>   File "/opt/web-apps/web2py/gluon/dal.py", line 8722, in isempty
>     return not self.select(limitby=(0,1))
>   File "/opt/web-apps/web2py/gluon/dal.py", line 8743, in select
>     return adapter.select(self.query,fields,attributes)
>   File "/opt/web-apps/web2py/gluon/dal.py", line 1583, in select
>     return self._select_aux(sql,fields,attributes)
>   File "/opt/web-apps/web2py/gluon/dal.py", line 1556, in _select_aux
>     self.execute(sql)
>
> My Connection string:
>
> *    #db = DAL('sqlite://storage.sqlite')
>     db = DAL('postgres://user:pass@localhost/dbapp')**
> *
>
> *Running on Centos 6.0, external Postgresql Server with 9 version, **Python 
> 2.6.6*
>
> *
> *
>
> Thanks in advance
>
> Christian.
>
>

-- 



Reply via email to