“‘BoundMetaData’ is not defined” error in SQLAlchemy


I get this error when creating a BoundMetaData object in SQLAlchemy 0.3.10. The fix is to just use MetaData instead of  BoundMetaData. BoundMetaData is deprecated and replaced with MetaData

Example code:

from sqlalchemy import *

db = create_engine('sqlite:///test.db')
metadata = MetaData(db)

"""
  Continue with the rest of your Python code
"""


Tags: , ,

4 Responses to ““‘BoundMetaData’ is not defined” error in SQLAlchemy”

Thanks for this, been banging my head trying to use BoundMetaData() for about an hour.

I would also like to thank you.Why is it that complex problems have simple solutions and viceversa?

F.

This was great help. Thanks. After LINQ – trying SqlAlchemy – specifically echo statement was great benefit.

My pleasure guys..


Leave a Reply

Advertisement