Issues

Issue #3134 resolved

pg8000 broken in 0.9.6

Maik Riechert
created an issue

I just upgraded from 0.9.4 to 0.9.6 and get the following error when running a query. I use pg8000.

  File "../site-packages/sqlalchemy/orm/query.py", line 2334, in first
    ret = list(self[0:1])
  File "../site-packages/sqlalchemy/orm/query.py", line 2201, in __getitem__
    return list(res)
  File "../site-packages/sqlalchemy/orm/query.py", line 2405, in __iter__
    return self._execute_and_instances(context)
  File "../site-packages/sqlalchemy/orm/query.py", line 2418, in _execute_and_instances
    close_with_result=True)
  File "../site-packages/sqlalchemy/orm/query.py", line 2409, in _connection_from_session
    **kw)
  File "../site-packages/sqlalchemy/orm/session.py", line 846, in connection
    close_with_result=close_with_result)
  File "../site-packages/sqlalchemy/orm/session.py", line 850, in _connection_for_bind
    return self.transaction._connection_for_bind(engine)
  File "../site-packages/sqlalchemy/orm/session.py", line 315, in _connection_for_bind
    conn = bind.contextual_connect()
  File "../site-packages/sqlalchemy/engine/base.py", line 1737, in contextual_connect
    self.pool.connect(),
  File "../site-packages/sqlalchemy/pool.py", line 332, in connect
    return _ConnectionFairy._checkout(self)
  File "../site-packages/sqlalchemy/pool.py", line 630, in _checkout
    fairy = _ConnectionRecord.checkout(pool)
  File "../site-packages/sqlalchemy/pool.py", line 433, in checkout
    rec = pool._do_get()
  File "../site-packages/sqlalchemy/pool.py", line 949, in _do_get
    return self._create_connection()
  File "../site-packages/sqlalchemy/pool.py", line 278, in _create_connection
    return _ConnectionRecord(self)
  File "../site-packages/sqlalchemy/pool.py", line 409, in __init__
    exec_once(self.connection, self)
  File "../site-packages/sqlalchemy/event/attr.py", line 247, in exec_once
    self(*args, **kw)
  File "../site-packages/sqlalchemy/event/attr.py", line 257, in __call__
    fn(*args, **kw)
  File "../site-packages/sqlalchemy/engine/strategies.py", line 156, in on_connect
    do_on_connect(conn)
  File "../site-packages/sqlalchemy/dialects/postgresql/base.py", line 1620, in connect
    self.set_isolation_level(conn, self.isolation_level)
  File "../site-packages/sqlalchemy/dialects/postgresql/pg8000.py", line 155, in set_isolation_level
    connection.connection.autocommit = False
AttributeError: 'Connection' object has no attribute 'connection'

Comments (7)

  1. Log in to comment