Guest User

Untitled

a guest
Dec 28th, 2017
162
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. >>> u = User.query.get(1)
  2. >>> p = Post(body="my first post!", author=u)
  3. Traceback (most recent call last):
  4. File "<stdin>", line 1, in <module>
  5. File "<string>", line 4, in __init__
  6. File "/mnt/c/Projects/flasklearn/microblog/venv/lib/python3.5/site-packages/sqlalchemy/orm/state.py", line 417, in _initialize_instance
  7. manager.dispatch.init_failure(self, args, kwargs)
  8. File "/mnt/c/Projects/flasklearn/microblog/venv/lib/python3.5/site-packages/sqlalchemy/util/langhelpers.py", line 66, in __exit__
  9. compat.reraise(exc_type, exc_value, exc_tb)
  10. File "/mnt/c/Projects/flasklearn/microblog/venv/lib/python3.5/site-packages/sqlalchemy/util/compat.py", line 187, in reraise
  11. raise value
  12. File "/mnt/c/Projects/flasklearn/microblog/venv/lib/python3.5/site-packages/sqlalchemy/orm/state.py", line 414, in _initialize_instance
  13. return manager.original_init(*mixed[1:], **kwargs)
  14. File "/mnt/c/Projects/flasklearn/microblog/venv/lib/python3.5/site-packages/sqlalchemy/ext/declarative/base.py", line 699, in _declarative_constructor
  15. (k, cls_.__name__))
  16. TypeError: 'author' is an invalid keyword argument for Post
  17. >>>
RAW Paste Data