Reputation: 13
I am getting the following error message:
Traceback (most recent call last):
File "alchemyTest.py", line 12, in <module>
planetMapper = mapper(Planet, planet)
NameError: name 'mapper' is not defined
My SQLAlchemy version is 1.0.12. I am using the following code:
connection = db.connect();
metadata = MetaData(db);
class Planet(object):
pass
planet = Table('PLANET', metadata, autoload=True)
planetMapper = mapper(Planet, planet)
I have searched online and have not been able to find anything on mapper not being defined. Any help is appreciated.
Upvotes: 0
Views: 1145