Re: [web2py] RuntimeError: No driver of supported ones ('psycopg2',) is available

29 views
Skip to first unread message
Message has been deleted

Massimiliano

unread,
Aug 1, 2022, 3:14:31 PM8/1/22
to web...@googlegroups.com
Try to install psycopg2-binary instead.

pip install psycopg2-binary


Il giorno lun 1 ago 2022 alle ore 17:10 Lee P <leepo...@gmail.com> ha scritto:
does web2py support postgres version 13?

I installed with:
 pip install psycopg2
I created the database and superuser
I edited postgresql.conf and pg_hba.conf
I tested the connection with my database, host, port, and superuser
 pg_isready -d drum -h localhost -p 5432 -U drumair  
The database is working and replies "localhost:5432 -accepting connections"

The connection string worked in previous configurations
 db = DAL('postgres://drumair:password@localhost/drum')

It does not work with postgres 13 with
 2.22.5-stable+timestamp.2022.06.04.11.01.33
 (Running on Rocket 1.2.6, Python 3.9.2) 
 System: 32-bit
 Kernel version: 5.15
 Debian version: 11 (bullseye)

I get the following error:
<class 'RuntimeError'> Failure to connect, tried 5 times: Traceback (most recent call last): File "/usr/lib/web2py/gluon/packages/dal/pydal/base.py", line 514, in __init__ self._adapter = adapter(**kwargs) File "/usr/lib/web2py/gluon/packages/dal/pydal/adapters/postgres.py", line 28, in __call__ return AdapterMeta.__call__(cls, *args, **kwargs) File "/usr/lib/web2py/gluon/packages/dal/pydal/adapters/__init__.py", line 41, in __call__ obj = super(AdapterMeta, cls).__call__(*args, **kwargs) File "/usr/lib/web2py/gluon/packages/dal/pydal/adapters/postgres.py", line 58, in __init__ super(Postgre, self).__init__( File "/usr/lib/web2py/gluon/packages/dal/pydal/adapters/base.py", line 424, in __init__ super(SQLAdapter, self).__init__(*args, **kwargs) File "/usr/lib/web2py/gluon/packages/dal/pydal/adapters/base.py", line 85, in __init__ self.find_driver() File "/usr/lib/web2py/gluon/packages/dal/pydal/adapters/base.py", line 133, in find_driver raise RuntimeError( RuntimeError: No driver of supported ones ('psycopg2',) is available

--
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+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/a9ab8198-2640-4125-afbf-2053c744448an%40googlegroups.com.


--
Massimiliano

Clemens

unread,
Aug 1, 2022, 3:19:50 PM8/1/22
to web2py-users
I'm using a similar configuration (Ubuntu instead of Debian, but that's no big difference). Thus, have a try with
pip3 install psycopg2
to make sure, you're using the python 3 lib.

Works for me :-)
Reply all
Reply to author
Forward
0 new messages