AttributeError: module 'relstorage.adapters.postgresql' has no attribute 'select_driver'

34 views
Skip to first unread message

Joe Barwell

unread,
Sep 14, 2020, 6:59:35 PM9/14/20
to newtdb

Hello,

newbie warning.
Following the instructions for 'getting started' here: http://www.newtdb.org/en/latest/getting-started.html

>>> import newt.db
>>> connection = newt.db.connection('')
Traceback (most recent call last):
  File "<pyshell#1>", line 1, in <module>
    connection = newt.db.connection('')
  File "/home/joe/.local/lib/python3.8/site-packages/newt/db/_db.py", line 153, in connection
    ZODB.connection(storage(dsn, **storage_options), **db_options)
  File "/home/joe/.local/lib/python3.8/site-packages/newt/db/_db.py", line 124, in storage
    return relstorage.storage.RelStorage(Adapter(dsn, options), options=options)
  File "/home/joe/.local/lib/python3.8/site-packages/newt/db/_adapter.py", line 13, in __init__
    driver = relstorage.adapters.postgresql.select_driver(self.options)
AttributeError: module 'relstorage.adapters.postgresql' has no attribute 'select_driver'

Sorry, I'm stumped. Can anyone please help? Thanks.

jason....@nextthought.com

unread,
Sep 14, 2020, 7:24:05 PM9/14/20
to newtdb
Please try installing RelStorage < 3. I'm afraid that RelStorage 3 involved large internal refactorings that were incompatible with netwdb.

gitedscribe

unread,
Nov 21, 2021, 3:20:50 PM11/21/21
to newtdb
Hello,
tried to downgrade as per your hint, but no luck: import error while import newt.db
ImportError: cannot import name '_cache_ring' from 'relstorage.cache' (/opt/xpend/venv/lib/python3.7/site-packages/relstorage/cache/__init__.py)
Even downgrading ZODB to 5.3.0 did not help (of course)

pip freeze:

BTrees==4.9.2
cffi==1.15.0
newt.db==0.9.0
perfmetrics==3.2.0.post0
persistent==4.7.0
pkg-resources==0.0.0
psycopg2==2.9.2
pycparser==2.21
RelStorage==2.0.0
six==1.16.0
transaction==3.0.1
zc.lockfile==2.0
ZConfig==3.6.0
zdaemon==4.3
ZEO==5.2.3
ZODB==5.3.0
zodbpickle==2.2.0
zope.dottedname==4.3
zope.interface==5.4.0

I am stump, too :)
Thanks in advance for the help.
Reply all
Reply to author
Forward
0 new messages