/Users/rj/anaconda3/envs/py36/lib/python3.6/site-packages/flask_sqlalchemy/__init__.py:835: FSADeprecationWarning: SQLALCHEMY_TRACK_MODIFICATIONS adds significant overhead and will be disabled by default in the future. Set it to True or False to suppress this warning.
'SQLALCHEMY_TRACK_MODIFICATIONS adds significant overhead and '
* Serving Flask app "application" (lazy loading)
* Environment: production
WARNING: Do not use the development server in a production environment.
Use a production WSGI server instead.
* Debug mode: off
* Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
[2019-12-17 10:31:52,643] ERROR in app: Exception on /user/add [GET]
Traceback (most recent call last):
File "/Users/rj/anaconda3/envs/py36/lib/python3.6/site-packages/flask/app.py", line 2292, in wsgi_app
response = self.full_dispatch_request()
File "/Users/rj/anaconda3/envs/py36/lib/python3.6/site-packages/flask/app.py", line 1815, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/Users/rj/anaconda3/envs/py36/lib/python3.6/site-packages/flask/app.py", line 1718, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/Users/rj/anaconda3/envs/py36/lib/python3.6/site-packages/flask/_compat.py", line 35, in reraise
raise value
File "/Users/rj/anaconda3/envs/py36/lib/python3.6/site-packages/flask/app.py", line 1813, in full_dispatch_request
rv = self.dispatch_request()
File "/Users/rj/anaconda3/envs/py36/lib/python3.6/site-packages/flask/app.py", line 1799, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/Users/rj/projects/flask-migrate-sample/application.py", line 108, in add_user
session.commit()
File "/Users/rj/anaconda3/envs/py36/lib/python3.6/site-packages/sqlalchemy/orm/session.py", line 943, in commit
self.transaction.commit()
File "/Users/rj/anaconda3/envs/py36/lib/python3.6/site-packages/sqlalchemy/orm/session.py", line 467, in commit
self._prepare_impl()
File "/Users/rj/anaconda3/envs/py36/lib/python3.6/site-packages/sqlalchemy/orm/session.py", line 447, in _prepare_impl
self.session.flush()
File "/Users/rj/anaconda3/envs/py36/lib/python3.6/site-packages/sqlalchemy/orm/session.py", line 2243, in flush
self._flush(objects)
File "/Users/rj/anaconda3/envs/py36/lib/python3.6/site-packages/sqlalchemy/orm/session.py", line 2369, in _flush
transaction.rollback(_capture_exception=True)
File "/Users/rj/anaconda3/envs/py36/lib/python3.6/site-packages/sqlalchemy/util/langhelpers.py", line 66, in __exit__
compat.reraise(exc_type, exc_value, exc_tb)
File "/Users/rj/anaconda3/envs/py36/lib/python3.6/site-packages/sqlalchemy/util/compat.py", line 187, in reraise
raise value
File "/Users/rj/anaconda3/envs/py36/lib/python3.6/site-packages/sqlalchemy/orm/session.py", line 2333, in _flush
flush_context.execute()
File "/Users/rj/anaconda3/envs/py36/lib/python3.6/site-packages/sqlalchemy/orm/unitofwork.py", line 391, in execute
rec.execute(self)
File "/Users/rj/anaconda3/envs/py36/lib/python3.6/site-packages/sqlalchemy/orm/unitofwork.py", line 556, in execute
uow
File "/Users/rj/anaconda3/envs/py36/lib/python3.6/site-packages/sqlalchemy/orm/persistence.py", line 156, in save_obj
base_mapper, states, uowtransaction
File "/Users/rj/anaconda3/envs/py36/lib/python3.6/site-packages/sqlalchemy/orm/persistence.py", line 286, in _organize_states_for_save
states):
File "/Users/rj/anaconda3/envs/py36/lib/python3.6/site-packages/sqlalchemy/orm/persistence.py", line 1251, in _connections_for_states
connection = uowtransaction.transaction.connection(base_mapper)
File "/Users/rj/anaconda3/envs/py36/lib/python3.6/site-packages/sqlalchemy/orm/session.py", line 293, in connection
bind = self.session.get_bind(bindkey, **kwargs)
File "/Users/rj/anaconda3/envs/py36/lib/python3.6/site-packages/sqlalchemy/orm/session.py", line 1393, in get_bind
', '.join(context)))
sqlalchemy.exc.UnboundExecutionError: Could not locate a bind configured on mapper Mapper|User|user or this Session