Rick Morrison wrote:
I won't have a chance to look at this under pyodbc until tomorrow. In the meantime, if you could try with pymssql to see if you get the same error, that will help in debugging this.What is the recommended module to use on win32? Yes, pymssql does help: I had to create the schema (wtfrak was I thinking...) Meanwhile, the stack trace isn't corrupted when using pymssql:
---8<---File "c:\python24\lib\site-packages\sqlalchemy-0.4.5-py2.4.egg\sqlalchemy\engi
ne\base.py", line 942, in _handle_dbapi_exceptionraise exceptions.DBAPIError.instance(statement, parameters, e, connection_in
validated=is_disconnect)sqlalchemy.exceptions.DatabaseError: (DatabaseError) internal error: SQL Server
message 2760, severity 16, state 1, line 2:The specified schema name "queer" either does not exist or you do not have permi
ssion to use it. ---8<---Side note: I wish easy_install pymssql*.exe would have put ntwdblib.dll inside the .egg directory; that was a false start. Also, pymssql+SA doesn't support SSPI authentication using the syntax presented earlier:
mssql://:@host/db
It happens on metadata.create_all(). Also, I've verified that "finally pops bad exception" happens on other exceptions, like failure to connect (this using pyodbc).Luis Bruno wrote:That error would be thrown by an insert, not a table create, and I believe there are other users using pyodbc with schema-specified tables without problems.File"c:\python24\lib\site-packages\sqlalchemy-0.4.5-py2.4.egg\sqlalchemy\databases\mssql.py", line 499, in do_execute cursor.execute("SET IDENTITY_INSERT %s OFF" % self.identifier_preparer.format_table(context.compiled.statement.table))SystemError: 'finally' pops bad exception
signature.asc
Description: OpenPGP digital signature