Skip to content

Instantly share code, notes, and snippets.

@lu911
Created April 23, 2014 05:49
Show Gist options
  • Save lu911/11204007 to your computer and use it in GitHub Desktop.
Save lu911/11204007 to your computer and use it in GitHub Desktop.
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "/home/loup/Desktop/projects/new_kidsmamma/kidsmamma/models/mixins.py", line 14, in get_by_id
return cls.query.get(int(id))
File "/home/loup/.virtualenvs/new-kidsmamma/local/lib/python2.7/site-packages/flask_sqlalchemy/__init__.py", line 426, in __get__
mapper = orm.class_mapper(type)
File "/home/loup/.virtualenvs/new-kidsmamma/local/lib/python2.7/site-packages/sqlalchemy/orm/base.py", line 378, in class_mapper
mapper = _inspect_mapped_class(class_, configure=configure)
File "/home/loup/.virtualenvs/new-kidsmamma/local/lib/python2.7/site-packages/sqlalchemy/orm/base.py", line 355, in _inspect_mapped_class
mapper._configure_all()
File "/home/loup/.virtualenvs/new-kidsmamma/local/lib/python2.7/site-packages/sqlalchemy/orm/mapper.py", line 1145, in _configure_all
configure_mappers()
File "/home/loup/.virtualenvs/new-kidsmamma/local/lib/python2.7/site-packages/sqlalchemy/orm/mapper.py", line 2557, in configure_mappers
raise e
InvalidRequestError: One or more mappers failed to initialize - can't proceed with initialization of other mappers. Original exception was: When initializing mapper Mapper|FoodNutrient|healthcare_food_nutrients, expression '_BoundDeclarativeMeta' failed to locate a name ("name '_BoundDeclarativeMeta' is not defined"). If this is a class name, consider adding this relationship() to the <class 'kidsmamma.models.healthcare.FoodNutrient'> class after both dependent classes have been defined.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment