you might want to try 0.4 where i think this has been fixed; else we
can file a new trac ticket.
On Aug 18, 2007, at 9:16 PM, Andy Hird wrote:
>
> Hi. I'm not sure if this is a known bug or whether I'm doing something
> obviously wrong.
>
> Using Oracle 10g, say I've got a pre-existing table something like
> this:
>
> create table testing (
> userid NUMBER PRIMARY KEY,
> is_active VARCHAR2(1) DEFAULT 'N'
> );
>
> when I try to autoload with sa 0.3.10 I get:
>
> testing_table = Table('testing', metadata, autoload=True)
>
> I get:
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> File "/usr/lib/python2.5/site-packages/SQLAlchemy-0.3.10-py2.5.egg/
> sqlalchemy/schema.py", line 175, in __call__
> metadata._get_engine(raiseerr=True).reflecttable(table)
> File "/usr/lib/python2.5/site-packages/SQLAlchemy-0.3.10-py2.5.egg/
> sqlalchemy/engine/base.py", line 806, in reflecttable
> self.dialect.reflecttable(conn, table)
> File "/usr/lib/python2.5/site-packages/SQLAlchemy-0.3.10-py2.5.egg/
> sqlalchemy/databases/oracle.py", line 358, in reflecttable
> row = c.fetchone()
> File "/usr/lib/python2.5/site-packages/SQLAlchemy-0.3.10-py2.5.egg/
> sqlalchemy/engine/base.py", line 1024, in fetchone
> return self._process_row(row)
> File "/usr/lib/python2.5/site-packages/SQLAlchemy-0.3.10-py2.5.egg/
> sqlalchemy/engine/base.py", line 1109, in _process_row
> row = [sup._get_col(row, i) for i in xrange(len(row))]
> File "/usr/lib/python2.5/site-packages/SQLAlchemy-0.3.10-py2.5.egg/
> sqlalchemy/engine/base.py", line 993, in _get_col
> return rec[1].convert_result_value(row[rec[2]], self.dialect)
> File "/usr/lib/python2.5/site-packages/SQLAlchemy-0.3.10-py2.5.egg/
> sqlalchemy/databases/oracle.py", line 117, in convert_result_value
> return value.read()
> AttributeError: 'str' object has no attribute 'read'
>
> In the call above the one with the fault I have:
> ipdb> p rec
> (OracleBinary(length=None), OracleBinary(length=None), 6)
> ipdb> p row
> ('IS_ACTIVE', 'VARCHAR2', 1, None, None, 'Y', "'N'\n")
>
> which is a little odd because the ALL_TAB_COLUMNS.DATA_DEFAULT column
> is of type LONG which looking inside of oracle.py should map to
> OracleText (and not OracleBinary).
>
> thanks for any help
> Andy
>
>
> >
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---