Found it! Apparently someone had written the connect string
incorrectly (a slash instead of a colon) on the pre-production
machine...
-S
On Aug 14, 12:21 pm, SOS <[EMAIL PROTECTED]> wrote:
> I am getting some kind of error from (apparently) cx_Oracle when
> attempting to connect. I am using cx_Oracle 4.2 on my dev box, on
> which this error does NOT happen. On the pre-production box, we had
> cx_Oracle 4.3 which gave the error and the admin then installed 4.2,
> which still gave the error (incomplete uninstall was my guess but that
> did not lead anywhere). Both use SQLAlchemy beta1. I used to get this
> on my dev machine but upgrading to cx_Oracle 4.2 fixed it (I had some
> very old version before).
>
> Here is the error and trace:
>
> /usr/lib/python2.4/site-packages/baasandmed/DataModel.py in
> initialiseDataModel(database=<sqlalchemy.orm.session.Session object>,
> databaseEngine=Engine(oracle://register/[EMAIL PROTECTED]))
> 544 meta = MetaData(databaseEngine)
> 545
> 546 BAASANDMED_VIEW = Table('baasandmed_view', meta,
> autoload = True)
> 547 BAASANDMED_FIELD = Table('baasandmed_field', meta,
> autoload = True)
> 548 BAASANDMED_MINIREF_VALUES =
> Table('baasandmed_miniref_values', meta, autoload = True)
> BAASANDMED_VIEW undefined, global Table = <class
> 'sqlalchemy.schema.Table'>, meta = MetaData(Engine(oracle://register/
> [EMAIL PROTECTED])), autoload undefined, builtin True = True
> /usr/lib/python2.4/site-packages/sqlalchemy/schema.py in
> __call__(self=<class 'sqlalchemy.schema.Table'>,
> name='baasandmed_view', metadata=MetaData(Engine(oracle://register/
> [EMAIL PROTECTED])), *args=(), **kwargs={})
> 115 autoload_with.reflecttable(table,
> include_columns=include_columns)
> 116 else:
> 117
> metadata._get_bind(raiseerr=True).reflecttable(table,
> include_columns=include_columns)
> 118 except exceptions.NoSuchTableError:
> 119 del metadata.tables[key]
> metadata = MetaData(Engine(oracle://register/[EMAIL PROTECTED])),
> metadata._get_bind = <bound method MetaData._get_bind of
> MetaData(Engine(oracle://register/[EMAIL PROTECTED]))>, raiseerr
> undefined, builtin True = True, ).reflecttable undefined, table =
> Table('baasandmed_view', MetaData(Engine(oracle://register/
> [EMAIL PROTECTED])), schema=None), include_columns = None
> /usr/lib/python2.4/site-packages/sqlalchemy/engine/base.py in
> reflecttable(self=Engine(oracle://register/[EMAIL PROTECTED]),
> table=Table('baasandmed_view', MetaData(Engine(oracle://register/
> [EMAIL PROTECTED])), schema=None), connection=None,
> include_columns=None)
> 1085
> 1086 if connection is None:
> 1087 conn = self.contextual_connect()
> 1088 else:
> 1089 conn = connection
> conn undefined, self = Engine(oracle://register/[EMAIL PROTECTED]),
> self.contextual_connect = <bound method Engine.contextual_connect of
> Engine(oracle://register/[EMAIL PROTECTED])>
> /usr/lib/python2.4/site-packages/sqlalchemy/engine/base.py in
> contextual_connect(self=Engine(oracle://register/[EMAIL PROTECTED]),
> close_with_result=False, **kwargs={})
> 1053 """
> 1054
> 1055 return Connection(self,
> close_with_result=close_with_result, **kwargs)
> 1056
> 1057 def table_names(self, schema=None, connection=None):
> global Connection = <class 'sqlalchemy.engine.base.Connection'>, self
> = Engine(oracle://register/[EMAIL PROTECTED]), close_with_result =
> False, kwargs = {}
> /usr/lib/python2.4/site-packages/sqlalchemy/engine/base.py in
> __init__(self=<sqlalchemy.engine.base.Connection object>,
> engine=Engine(oracle://register/[EMAIL PROTECTED]), connection=None,
> close_with_result=False, _branch=False)
> 537 def __init__(self, engine, connection=None,
> close_with_result=False, _branch=False):
> 538 self.__engine = engine
> 539 self.__connection = connection or
> engine.raw_connection()
> 540 self.__transaction = None
> 541 self.__close_with_result = close_with_result
> self = <sqlalchemy.engine.base.Connection object>, self.__connection
> undefined, connection = None, engine = Engine(oracle://register/
> [EMAIL PROTECTED]), engine.raw_connection = <bound method
> Engine.raw_connection of Engine(oracle://register/
> [EMAIL PROTECTED])>
> /usr/lib/python2.4/site-packages/sqlalchemy/engine/base.py in
> raw_connection(self=Engine(oracle://register/[EMAIL PROTECTED]))
> 1100 """Return a DBAPI connection."""
> 1101
> 1102 return self.pool.connect()
> 1103
> 1104 def log(self, msg):
> self = Engine(oracle://register/[EMAIL PROTECTED]), self.pool =
> <sqlalchemy.pool.QueuePool object>, self.pool.connect = <bound method
> QueuePool.connect of <sqlalchemy.pool.QueuePool object>>
> /usr/lib/python2.4/site-packages/sqlalchemy/pool.py in
> connect(self=<sqlalchemy.pool.QueuePool object>)
> 157 def connect(self):
> 158 if not self._use_threadlocal:
> 159 return _ConnectionFairy(self).checkout()
> 160
> 161 try:
> global _ConnectionFairy = <class 'sqlalchemy.pool._ConnectionFairy'>,
> self = <sqlalchemy.pool.QueuePool object>, ).checkout undefined
> /usr/lib/python2.4/site-packages/sqlalchemy/pool.py in
> __init__(self=<sqlalchemy.pool._ConnectionFairy object>,
> pool=<sqlalchemy.pool.QueuePool object>)
> 262 self.__counter = 0
> 263 try:
> 264 self._connection_record = pool.get()
> 265 self.connection =
> self._connection_record.get_connection()
> 266 except:
> self = <sqlalchemy.pool._ConnectionFairy object>,
> self._connection_record = None, pool = <sqlalchemy.pool.QueuePool
> object>, pool.get = <bound method QueuePool.get of
> <sqlalchemy.pool.QueuePool object>>
> /usr/lib/python2.4/site-packages/sqlalchemy/pool.py in
> get(self=<sqlalchemy.pool.QueuePool object>)
> 172
> 173 def get(self):
> 174 return self.do_get()
> 175
> 176 def do_get(self):
> self = <sqlalchemy.pool.QueuePool object>, self.do_get = <bound method
> QueuePool.do_get of <sqlalchemy.pool.QueuePool object>>
> /usr/lib/python2.4/site-packages/sqlalchemy/pool.py in
> do_get(self=<sqlalchemy.pool.QueuePool object>)
> 554
> 555 try:
> 556 con = self.create_connection()
> 557 self._overflow += 1
> 558 finally:
> con undefined, self = <sqlalchemy.pool.QueuePool object>,
> self.create_connection = <bound method QueuePool.create_connection of
> <sqlalchemy.pool.QueuePool object>>
> /usr/lib/python2.4/site-packages/sqlalchemy/pool.py in
> create_connection(self=<sqlalchemy.pool.QueuePool object>)
> 140
> 141 def create_connection(self):
> 142 return _ConnectionRecord(self)
> 143
> 144 def recreate(self):
> global _ConnectionRecord = <class
> 'sqlalchemy.pool._ConnectionRecord'>, self =
> <sqlalchemy.pool.QueuePool object>
> /usr/lib/python2.4/site-packages/sqlalchemy/pool.py in
> __init__(self=<sqlalchemy.pool._ConnectionRecord object>,
> pool=<sqlalchemy.pool.QueuePool object>)
> 200 def __init__(self, pool):
> 201 self.__pool = pool
> 202 self.connection = self.__connect()
> 203 self.properties = {}
> 204 if pool._on_connect:
> self = <sqlalchemy.pool._ConnectionRecord object>, self.connection
> undefined, self.__connect undefined
> /usr/lib/python2.4/site-packages/sqlalchemy/pool.py in
> __connect(self=<sqlalchemy.pool._ConnectionRecord object>)
> 248 try:
> 249 self.starttime = time.time()
> 250 connection = self.__pool._creator()
> 251 self.__pool.log("Created new connection %s" %
> repr(connection))
> 252 return connection
> connection undefined, self = <sqlalchemy.pool._ConnectionRecord
> object>, self.__pool undefined
> /usr/lib/python2.4/site-packages/sqlalchemy/engine/strategies.py in
> connect()
>
> 72 return dbapi.connect(*cargs, **cparams)
> 73 except Exception, e:
> 74 raise exceptions.DBAPIError(None, None, e)
> 75 creator = kwargs.pop('creator', connect)
> 76
> global exceptions = <module 'sqlalchemy.exceptions' from '/usr/lib/
> python2.4/site-packages/sqlalchemy/exceptions.pyc'>,
> exceptions.DBAPIError = <class sqlalchemy.exceptions.DBAPIError>,
> builtin None = None, e = <exceptions.TypeError instance>
> DBAPIError: (TypeError) argument 1 must be string or read-only buffer,
> not None None None
> args = ('(TypeError) argument 1 must be string or read-only
> buffer, not None',)
> orig = <exceptions.TypeError instance>
> params = None
> statement = None
>
> Any ideas/suggestions? I don't know anything of the internals of
> either SQLAlchemy or cx_Oracle so I am quite stumped.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---