Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- vlad@elmo src % FLASK_APP=main.py flask run
- * Serving Flask app "main.py"
- * Environment: production
- WARNING: This is a development server. Do not use it in a production deployment.
- Use a production WSGI server instead.
- * Debug mode: off
- public.heliports
- Traceback (most recent call last):
- File "/Library/Python/3.7/site-packages/sqlalchemy/engine/base.py", line 1249, in _execute_context
- cursor, statement, parameters, context
- File "/Library/Python/3.7/site-packages/sqlalchemy/engine/default.py", line 580, in do_execute
- cursor.execute(statement, parameters)
- psycopg2.errors.UndefinedTable: relation "public.heliports" does not exist
- LINE 2: FROM public.heliports
- ^
- The above exception was the direct cause of the following exception:
- Traceback (most recent call last):
- File "/usr/local/bin/flask", line 8, in <module>
- sys.exit(main())
- File "/Library/Python/3.7/site-packages/flask/cli.py", line 966, in main
- cli.main(prog_name="python -m flask" if as_module else None)
- File "/Library/Python/3.7/site-packages/flask/cli.py", line 586, in main
- return super(FlaskGroup, self).main(*args, **kwargs)
- File "/Library/Python/3.7/site-packages/click/core.py", line 717, in main
- rv = self.invoke(ctx)
- File "/Library/Python/3.7/site-packages/click/core.py", line 1137, in invoke
- return _process_result(sub_ctx.command.invoke(sub_ctx))
- File "/Library/Python/3.7/site-packages/click/core.py", line 956, in invoke
- return ctx.invoke(self.callback, **ctx.params)
- File "/Library/Python/3.7/site-packages/click/core.py", line 555, in invoke
- return callback(*args, **kwargs)
- File "/Library/Python/3.7/site-packages/click/decorators.py", line 64, in new_func
- return ctx.invoke(f, obj, *args, **kwargs)
- File "/Library/Python/3.7/site-packages/click/core.py", line 555, in invoke
- return callback(*args, **kwargs)
- File "/Library/Python/3.7/site-packages/flask/cli.py", line 848, in run_command
- app = DispatchingApp(info.load_app, use_eager_loading=eager_loading)
- File "/Library/Python/3.7/site-packages/flask/cli.py", line 305, in __init__
- self._load_unlocked()
- File "/Library/Python/3.7/site-packages/flask/cli.py", line 330, in _load_unlocked
- self._app = rv = self.loader()
- File "/Library/Python/3.7/site-packages/flask/cli.py", line 388, in load_app
- app = locate_app(self, import_name, name)
- File "/Library/Python/3.7/site-packages/flask/cli.py", line 240, in locate_app
- __import__(module_name)
- File "/Users/vlad/Developer/poletpro/api/src/main.py", line 8, in <module>
- from lib.db import heliport_handler
- File "/Users/vlad/Developer/poletpro/api/src/lib/db.py", line 58, in <module>
- heliport_handler = Heliport(session)
- File "/Users/vlad/Developer/poletpro/api/src/lib/db.py", line 55, in __init__
- self.get_heliports_from_db()
- File "/Users/vlad/Developer/poletpro/api/src/lib/db.py", line 34, in get_heliports_from_db
- for inst in self.session.query(HeliportORM):
- File "/Library/Python/3.7/site-packages/sqlalchemy/orm/query.py", line 3342, in __iter__
- return self._execute_and_instances(context)
- File "/Library/Python/3.7/site-packages/sqlalchemy/orm/query.py", line 3367, in _execute_and_instances
- result = conn.execute(querycontext.statement, self._params)
- File "/Library/Python/3.7/site-packages/sqlalchemy/engine/base.py", line 988, in execute
- return meth(self, multiparams, params)
- File "/Library/Python/3.7/site-packages/sqlalchemy/sql/elements.py", line 287, in _execute_on_connection
- return connection._execute_clauseelement(self, multiparams, params)
- File "/Library/Python/3.7/site-packages/sqlalchemy/engine/base.py", line 1107, in _execute_clauseelement
- distilled_params,
- File "/Library/Python/3.7/site-packages/sqlalchemy/engine/base.py", line 1253, in _execute_context
- e, statement, parameters, cursor, context
- File "/Library/Python/3.7/site-packages/sqlalchemy/engine/base.py", line 1473, in _handle_dbapi_exception
- util.raise_from_cause(sqlalchemy_exception, exc_info)
- File "/Library/Python/3.7/site-packages/sqlalchemy/util/compat.py", line 398, in raise_from_cause
- reraise(type(exception), exception, tb=exc_tb, cause=cause)
- File "/Library/Python/3.7/site-packages/sqlalchemy/util/compat.py", line 152, in reraise
- raise value.with_traceback(tb)
- File "/Library/Python/3.7/site-packages/sqlalchemy/engine/base.py", line 1249, in _execute_context
- cursor, statement, parameters, context
- File "/Library/Python/3.7/site-packages/sqlalchemy/engine/default.py", line 580, in do_execute
- cursor.execute(statement, parameters)
- sqlalchemy.exc.ProgrammingError: (psycopg2.errors.UndefinedTable) relation "public.heliports" does not exist
- LINE 2: FROM public.heliports
- ^
- [SQL: SELECT public.heliports.heliport_id AS public_heliports_heliport_id, public.heliports.title AS public_heliports_title, public.heliports.description AS public_heliports_description, public.heliports.latitude AS public_heliports_latitude, public.heliports.longitude AS public_heliports_longitude, public.heliports.created_at AS public_heliports_created_at, public.heliports.modified_at AS public_heliports_modified_at
- FROM public.heliports]
- (Background on this error at: http://sqlalche.me/e/f405)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement