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

Comments (7)

  1. Log in to comment