Hi, I am running into an error with sqlalchemy when using XML datatype in MSSQL (existing table). My test_table just has two columns: id, test. The test column is xml datatype. Is XML datatype supported? Or is it something I did not do correctly? Thanks for your help in advance. TPN
Here is the statement that generates the error: ================================= t_test_table = Table('test_table', metadata, autoload=True, autoload_with=eng) Here is the error: ============ File "./ePackages/sqlalchemy/databases/mssql.py", line 1240, in reflecttable if issubclass(coltype, sqltypes.Numeric): TypeError: issubclass() arg 1 must be a class The version of sqlalchemy: =================== >>> import sqlalchemy >>> print sqlalchemy.__version__ 0.5.5 Here is the script (test_xml.py): ====================== import ePackages import pyodbc import sqlalchemy from sqlalchemy import * session = None metadata = MetaData() def pycon(): return pyodbc.connect("DRIVER={FreeTDS};SERVER=myserver;DATABASE=MYDATABASE;PORT=1435;UID=MYUSER;PWD=MYPASS") def init_model(eng): global session, metadata metadata.bind = eng t_test_table = Table('test_table', metadata, autoload=True, autoload_with=eng) sm = sqlalchemy.orm.sessionmaker(autoflush=False, autocommit=False, bind=eng) session = sqlalchemy.orm.scoped_session(sm) print "testpoint 1" engine = create_engine('mssql://', creator=pycon, echo=True) print "testpoint 2" init_model(engine) print "testpoint 3" -- 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.