Sorry to bother,
I am trying to run the tutorial (Define and Create a Table)
    http://www.sqlalchemy.org/docs/05/ormtutorial.html
and get the following error after executing the statement:
metadata.create_all(engine)
    Cannot operate on a closed cursor

Running Windows XP, Python 2.5.1, TurboGears 1.0.8, SQLAlchemy 0.5.2

I am running from the command prompt, have cut-and-pasted all of the
commands, so there shouldn't be a typo. No error messages until this
point.

# test code begins here
import sqlalchemy
sqlalchemy.__version__

from sqlalchemy import create_engine
engine = create_engine('sqlite:///:memory:', echo=True)

from sqlalchemy import Table, Column, Integer, String, MetaData,
ForeignKey
metadata = MetaData()

users_table = Table('users', metadata,
Column('id', Integer, primary_key=True),
Column('name', String),
Column('fullname', String),
Column('password', String)
)

metadata.create_all(engine)

# test code ENDS here

(traceback and error message here:  Cannot operate on a closed
cursor )


--Thanks, Tim

* * * *

--~--~---------~--~----~------------~-------~--~----~
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