[Sqlalchemy-tickets] [sqlalchemy] #1609: 'OracleCursor' object has no attribute 'cursor' with cx_Or
Brought to you by:
zzzeek
From: sqlalchemy <mi...@zz...> - 2009-11-06 14:27:50
|
#1609: 'OracleCursor' object has no attribute 'cursor' with cx_Oracle and sqlalchemy '0.6beta1' --------------------+------------------------------------------------------- Reporter: guest | Owner: zzzeek Type: defect | Status: new Priority: medium | Milestone: Component: oracle | Severity: no triage selected yet Keywords: | Status_field: awaiting triage --------------------+------------------------------------------------------- I retrieved this version from svn , r6484. This is on a Windows XP box. I'm using ActiveState Python 2.6.1.1, cx_Oracle 5.0.2-10g, Oracle client libraries 10.2.0.4.0, and an Oracle database also 10.2.0.4.0. When running this script: --------------------------------- {{{ import sqlalchemy as sa connect_url ='oracle://<user>@<instance>' password = '<password>' engine = sa.create_engine(connect_url, connect_args={'password':password}) conn = engine.connect() }}} --------------------------------- I get this traceback: {{{ Traceback (most recent call last): File "satest.py", line 7, in <module> conn = engine.connect() File "C:\opt\python26\Lib\site-packages\sqlalchemy\engine\base.py", line 1420, in connect return self.Connection(self, **kwargs) File "C:\opt\python26\Lib\site-packages\sqlalchemy\engine\base.py", line 699, in __init__ self.__connection = connection or engine.raw_connection() File "C:\opt\python26\Lib\site-packages\sqlalchemy\engine\base.py", line 1470, in raw_connection return self.pool.unique_connection() File "C:\opt\python26\Lib\site-packages\sqlalchemy\pool.py", line 120, in unique_connection return _ConnectionFairy(self).checkout() File "C:\opt\python26\Lib\site-packages\sqlalchemy\pool.py", line 313, in __init__ rec = self._connection_record = pool.get() File "C:\opt\python26\Lib\site-packages\sqlalchemy\pool.py", line 162, in get return self.do_get() File "C:\opt\python26\Lib\site-packages\sqlalchemy\pool.py", line 651, in do_get con = self.create_connection() File "C:\opt\python26\Lib\site-packages\sqlalchemy\pool.py", line 123, in create_connection return _ConnectionRecord(self) File "C:\opt\python26\Lib\site-packages\sqlalchemy\pool.py", line 203, in __init__ l.first_connect(self.connection, self) File "C:\opt\python26\Lib\site- packages\sqlalchemy\engine\strategies.py", line 136, in first_connect dialect.initialize(c) File "C:\opt\python26\Lib\site- packages\sqlalchemy\dialects\oracle\base.py", line 522, in initialize super(OracleDialect, self).initialize(connection) File "C:\opt\python26\Lib\site-packages\sqlalchemy\engine\default.py", line 109, in initialize self.default_schema_name = self._get_default_schema_name(connection) File "C:\opt\python26\Lib\site- packages\sqlalchemy\dialects\oracle\base.py", line 566, in _get_default_schema_name return self.normalize_name(connection.execute('SELECT USER FROM DUAL').scalar()) File "C:\opt\python26\Lib\site-packages\sqlalchemy\engine\base.py", line 991, in execute return Connection.executors[c](self, object, multiparams, params) File "C:\opt\python26\Lib\site-packages\sqlalchemy\engine\base.py", line 1066, in _execute_text context = self.__create_execution_context(statement=statement, parameters=parameters) File "C:\opt\python26\Lib\site-packages\sqlalchemy\engine\base.py", line 1126, in __create_execution_context return dialect.execution_ctx_cls(dialect, connection=self, **kwargs) File "C:\opt\python26\Lib\site-packages\sqlalchemy\engine\default.py", line 284, in __init__ self.cursor = self.create_cursor() File "c:\opt\python26\lib\site- packages\sqlalchemy\dialects\oracle\cx_oracle.py", line 237, in create_cursor c.cursor.arraysize = self.dialect.arraysize AttributeError: 'OracleCursor' object has no attribute 'cursor' }}} -- Ticket URL: <http://www.sqlalchemy.org/trac/ticket/1609> sqlalchemy <http://www.sqlalchemy.org/> The Database Toolkit for Python |