You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I dont know where to report this, maybe it should be implemented in sqlalchemy but I'm quite not sure.
psycopg2 ver >= 2.8 adds connection.info object and the pool connection get from sqlalchemy pool actually has info object but it's an empty dict so it causes this error
In [1]: fromdjango.dbimportconnectionIn [2]: c=connection.cursor()
---------------------------------------------------------------------------AttributeErrorTraceback (mostrecentcalllast)
<ipython-input-2-5783720e8456>in<module>---->1c=connection.cursor()
~/.local/share/virtualenvs/atom-admin-py3.6/lib/python3.6/site-packages/django/db/backends/base/base.pyincursor(self)
252Createsacursor, openingaconnectionifnecessary.
253"""--> 254 return self._cursor() 255 256 def commit(self):~/.local/share/virtualenvs/atom-admin-py3.6/lib/python3.6/site-packages/django/db/backends/base/base.py in _cursor(self, name) 227 228 def _cursor(self, name=None):--> 229 self.ensure_connection() 230 with self.wrap_database_errors: 231 return self._prepare_cursor(self.create_cursor(name))~/.local/share/virtualenvs/atom-admin-py3.6/lib/python3.6/site-packages/django/db/backends/base/base.py in ensure_connection(self) 211 if self.connection is None: 212 with self.wrap_database_errors:--> 213 self.connect() 214 215 # ##### Backend-specific wrappers for PEP-249 connection methods #####~/.local/share/virtualenvs/atom-admin-py3.6/lib/python3.6/site-packages/django/db/backends/base/base.py in connect(self) 190 self.set_autocommit(self.settings_dict['AUTOCOMMIT']) 191 self.init_connection_state()--> 192 connection_created.send(sender=self.__class__, connection=self) 193 194 self.run_on_commit = []~/.local/share/virtualenvs/atom-admin-py3.6/lib/python3.6/site-packages/django/dispatch/dispatcher.py in send(self, sender, **named) 191 return [ 192 (receiver, receiver(signal=self, sender=sender, **named))--> 193 for receiver in self._live_receivers(sender) 194 ] 195 ~/.local/share/virtualenvs/atom-admin-py3.6/lib/python3.6/site-packages/django/dispatch/dispatcher.py in <listcomp>(.0) 191 return [ 192 (receiver, receiver(signal=self, sender=sender, **named))--> 193 for receiver in self._live_receivers(sender) 194 ] 195 ~/.local/share/virtualenvs/atom-admin-py3.6/lib/python3.6/site-packages/django/contrib/postgres/signals.py in register_type_handlers(connection, **kwargs) 14 register_hstore(connection.connection, globally=True, unicode=True) 15 else:---> 16 register_hstore(connection.connection, globally=True) 17 except ProgrammingError: 18 # Hstore is not available on the database.~/.local/share/virtualenvs/atom-admin-py3.6/lib/python3.6/site-packages/psycopg2/extras.py in register_hstore(conn_or_curs, globally, unicode, oid, array_oid) 956 """957ifoidisNone:
-->958oid=HstoreAdapter.get_oids(conn_or_curs)
959ifoidisNoneornotoid[0]:
960raisepsycopg2.ProgrammingError(
~/.local/share/virtualenvs/atom-admin-py3.6/lib/python3.6/site-packages/psycopg2/extras.pyinget_oids(self, conn_or_curs)
901902# column typarray not available before PG 8.3-->903typarray=conn.info.server_version>=80300and"typarray"or"NULL"904905rv0, rv1= [], []
AttributeError: 'dict'objecthasnoattribute'server_version'
The text was updated successfully, but these errors were encountered:
I dont know where to report this, maybe it should be implemented in sqlalchemy but I'm quite not sure.
psycopg2 ver >= 2.8 adds
connection.info
object and the pool connection get from sqlalchemy pool actually has info object but it's an empty dict so it causes this errorThe text was updated successfully, but these errors were encountered: