oracle reflection error in 0.3.10

Issue #751 resolved
Former user created an issue

Traceback (most recent call last): File "./scripts/reflect_models.py", line 162, in <module> main() File "./scripts/reflect_models.py", line 153, in main t = get_table(name, metadata, owner=user) File "./scripts/reflect_models.py", line 127, in get_table return sqlalchemy.Table(table_name, metadata, **kwargs) File "/tmp/sa_ora_reflect_error/src/sqlalchemy/lib/sqlalchemy/schema.py", line 175, in call metadata._get_engine(raiseerr=True).reflecttable(table) File "/tmp/sa_ora_reflect_error/src/sqlalchemy/lib/sqlalchemy/engine/base.py", line 806, in reflecttable self.dialect.reflecttable(conn, table) File "/tmp/sa_ora_reflect_error/src/sqlalchemy/lib/sqlalchemy/databases/oracle.py", line 358, in reflecttable row = c.fetchone() File "/tmp/sa_ora_reflect_error/src/sqlalchemy/lib/sqlalchemy/engine/base.py", line 1024, in fetchone return self._process_row(row) File "/tmp/sa_ora_reflect_error/src/sqlalchemy/lib/sqlalchemy/engine/base.py", line 1109, in _process_row row = i) for i in xrange(len(row))'

When trying to troublshoot this bug, it appears, for the schema I have, it last worked in 0.3.8. Will attach a patch, taken from trunk, which works.

Comments (2)

  1. Mike Bayer repo owner

    can you attach a copy of the table schema which is producing this behavior ? otherwise this ticket can't be acted upon (no test case).

    i wonder if these issues are cx_oracle specific. have you tried a more recent version of cx_oracle ? it all comes down to which oracle types result in cx_oracle returning a LOB object and which result in it returning a plain string.

  2. Log in to comment