send along what the CREATE TABLE for the table in question looks like.

On Jan 20, 2009, at 4:20 PM, Greg wrote:

>
> I've got the following code to reflect an MS SQL 8 database using the
> latest stable pyodbc, python 2.5, and SQLAlchemy 5.1:
>
> engine = create_engine('mssql://userXXX:pass...@mydsn', echo=False)
> meta = MetaData()
> meta.bind = engine
>
> artreqs = Table('tb_FSAR_Data_SampArtReq', meta, autoload=True,
> autoload_with=engine)
>
> And am getting this error when I run it:
>
> Traceback (most recent call last):
>  File "alchemy.py", line 9, in <module>
>    artreqs = Table('tb_FSAR_Data_SampArtReq', meta, autoload=True,
> autoload_with=engine)
>  File "/usr/lib/python2.5/site-packages/SQLAlchemy-0.5.1-py2.5.egg/
> sqlalchemy/schema.py", line 113, in __call__
>    return type.__call__(self, name, metadata, *args, **kwargs)
>  File "/usr/lib/python2.5/site-packages/SQLAlchemy-0.5.1-py2.5.egg/
> sqlalchemy/schema.py", line 239, in __init__
>    autoload_with.reflecttable(self, include_columns=include_columns)
>  File "/usr/lib/python2.5/site-packages/SQLAlchemy-0.5.1-py2.5.egg/
> sqlalchemy/engine/base.py", line 1265, in reflecttable
>    self.dialect.reflecttable(conn, table, include_columns)
>  File "/usr/lib/python2.5/site-packages/SQLAlchemy-0.5.1-py2.5.egg/
> sqlalchemy/databases/mssql.py", line 1157, in reflecttable
>    coltype = coltype(*args, **kwargs)
> TypeError: __init__() takes at most 2 arguments (3 given)
>
> Any ideas? I'm not too sure what's going on here.
>
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to