Advertisement
Guest User

Untitled

a guest
Oct 14th, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.24 KB | None | 0 0
  1. vlad@elmo src % FLASK_APP=main.py flask run
  2. * Serving Flask app "main.py"
  3. * Environment: production
  4. WARNING: This is a development server. Do not use it in a production deployment.
  5. Use a production WSGI server instead.
  6. * Debug mode: off
  7. public.heliports
  8. Traceback (most recent call last):
  9. File "/Library/Python/3.7/site-packages/sqlalchemy/engine/base.py", line 1249, in _execute_context
  10. cursor, statement, parameters, context
  11. File "/Library/Python/3.7/site-packages/sqlalchemy/engine/default.py", line 580, in do_execute
  12. cursor.execute(statement, parameters)
  13. psycopg2.errors.UndefinedTable: relation "public.heliports" does not exist
  14. LINE 2: FROM public.heliports
  15. ^
  16.  
  17.  
  18. The above exception was the direct cause of the following exception:
  19.  
  20. Traceback (most recent call last):
  21. File "/usr/local/bin/flask", line 8, in <module>
  22. sys.exit(main())
  23. File "/Library/Python/3.7/site-packages/flask/cli.py", line 966, in main
  24. cli.main(prog_name="python -m flask" if as_module else None)
  25. File "/Library/Python/3.7/site-packages/flask/cli.py", line 586, in main
  26. return super(FlaskGroup, self).main(*args, **kwargs)
  27. File "/Library/Python/3.7/site-packages/click/core.py", line 717, in main
  28. rv = self.invoke(ctx)
  29. File "/Library/Python/3.7/site-packages/click/core.py", line 1137, in invoke
  30. return _process_result(sub_ctx.command.invoke(sub_ctx))
  31. File "/Library/Python/3.7/site-packages/click/core.py", line 956, in invoke
  32. return ctx.invoke(self.callback, **ctx.params)
  33. File "/Library/Python/3.7/site-packages/click/core.py", line 555, in invoke
  34. return callback(*args, **kwargs)
  35. File "/Library/Python/3.7/site-packages/click/decorators.py", line 64, in new_func
  36. return ctx.invoke(f, obj, *args, **kwargs)
  37. File "/Library/Python/3.7/site-packages/click/core.py", line 555, in invoke
  38. return callback(*args, **kwargs)
  39. File "/Library/Python/3.7/site-packages/flask/cli.py", line 848, in run_command
  40. app = DispatchingApp(info.load_app, use_eager_loading=eager_loading)
  41. File "/Library/Python/3.7/site-packages/flask/cli.py", line 305, in __init__
  42. self._load_unlocked()
  43. File "/Library/Python/3.7/site-packages/flask/cli.py", line 330, in _load_unlocked
  44. self._app = rv = self.loader()
  45. File "/Library/Python/3.7/site-packages/flask/cli.py", line 388, in load_app
  46. app = locate_app(self, import_name, name)
  47. File "/Library/Python/3.7/site-packages/flask/cli.py", line 240, in locate_app
  48. __import__(module_name)
  49. File "/Users/vlad/Developer/poletpro/api/src/main.py", line 8, in <module>
  50. from lib.db import heliport_handler
  51. File "/Users/vlad/Developer/poletpro/api/src/lib/db.py", line 58, in <module>
  52. heliport_handler = Heliport(session)
  53. File "/Users/vlad/Developer/poletpro/api/src/lib/db.py", line 55, in __init__
  54. self.get_heliports_from_db()
  55. File "/Users/vlad/Developer/poletpro/api/src/lib/db.py", line 34, in get_heliports_from_db
  56. for inst in self.session.query(HeliportORM):
  57. File "/Library/Python/3.7/site-packages/sqlalchemy/orm/query.py", line 3342, in __iter__
  58. return self._execute_and_instances(context)
  59. File "/Library/Python/3.7/site-packages/sqlalchemy/orm/query.py", line 3367, in _execute_and_instances
  60. result = conn.execute(querycontext.statement, self._params)
  61. File "/Library/Python/3.7/site-packages/sqlalchemy/engine/base.py", line 988, in execute
  62. return meth(self, multiparams, params)
  63. File "/Library/Python/3.7/site-packages/sqlalchemy/sql/elements.py", line 287, in _execute_on_connection
  64. return connection._execute_clauseelement(self, multiparams, params)
  65. File "/Library/Python/3.7/site-packages/sqlalchemy/engine/base.py", line 1107, in _execute_clauseelement
  66. distilled_params,
  67. File "/Library/Python/3.7/site-packages/sqlalchemy/engine/base.py", line 1253, in _execute_context
  68. e, statement, parameters, cursor, context
  69. File "/Library/Python/3.7/site-packages/sqlalchemy/engine/base.py", line 1473, in _handle_dbapi_exception
  70. util.raise_from_cause(sqlalchemy_exception, exc_info)
  71. File "/Library/Python/3.7/site-packages/sqlalchemy/util/compat.py", line 398, in raise_from_cause
  72. reraise(type(exception), exception, tb=exc_tb, cause=cause)
  73. File "/Library/Python/3.7/site-packages/sqlalchemy/util/compat.py", line 152, in reraise
  74. raise value.with_traceback(tb)
  75. File "/Library/Python/3.7/site-packages/sqlalchemy/engine/base.py", line 1249, in _execute_context
  76. cursor, statement, parameters, context
  77. File "/Library/Python/3.7/site-packages/sqlalchemy/engine/default.py", line 580, in do_execute
  78. cursor.execute(statement, parameters)
  79. sqlalchemy.exc.ProgrammingError: (psycopg2.errors.UndefinedTable) relation "public.heliports" does not exist
  80. LINE 2: FROM public.heliports
  81. ^
  82.  
  83. [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
  84. FROM public.heliports]
  85. (Background on this error at: http://sqlalche.me/e/f405)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement