You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying to extract flights for today causes an exception:
(ogn-python) mat@devbox:~/dev/ogn-python$ flask flights create 2022-07-03 2022-07-03 0
2022-07-03: 0%| | 0/1 [00:14<?, ?it/s]
Traceback (most recent call last):
File "/home/mat/.virtualenvs/ogn-python/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1819, in _execute_context
self.dialect.do_execute(
File "/home/mat/.virtualenvs/ogn-python/lib/python3.8/site-packages/sqlalchemy/engine/default.py", line 732, in do_execute
cursor.execute(statement, parameters)
psycopg2.errors.UndefinedTable: relation "flights" does not exist
LINE 2: INSERT INTO flights(date, sender_id, flight_type, mu...
^
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/mat/.virtualenvs/ogn-python/bin/flask", line 8, in <module>
sys.exit(main())
File "/home/mat/.virtualenvs/ogn-python/lib/python3.8/site-packages/flask/cli.py", line 990, in main
cli.main(args=sys.argv[1:])
File "/home/mat/.virtualenvs/ogn-python/lib/python3.8/site-packages/flask/cli.py", line 596, in main
return super().main(*args, **kwargs)
File "/home/mat/.virtualenvs/ogn-python/lib/python3.8/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/home/mat/.virtualenvs/ogn-python/lib/python3.8/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/mat/.virtualenvs/ogn-python/lib/python3.8/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/mat/.virtualenvs/ogn-python/lib/python3.8/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/mat/.virtualenvs/ogn-python/lib/python3.8/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/home/mat/.virtualenvs/ogn-python/lib/python3.8/site-packages/click/decorators.py", line 26, in new_func
return f(get_current_context(), *args, **kwargs)
File "/home/mat/.virtualenvs/ogn-python/lib/python3.8/site-packages/flask/cli.py", line 440, in decorator
return __ctx.invoke(f, *args, **kwargs)
File "/home/mat/.virtualenvs/ogn-python/lib/python3.8/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/home/mat/dev/ogn-python/app/commands/flights.py", line 28, in create
result = compute_flights(date=single_date, flight_type=flight_type)
File "/home/mat/dev/ogn-python/app/collect/flights.py", line 67, in compute_flights
db.session.execute(query)
File "<string>", line 2, in execute
File "/home/mat/.virtualenvs/ogn-python/lib/python3.8/site-packages/sqlalchemy/orm/session.py", line 1712, in execute
result = conn._execute_20(statement, params or {}, execution_options)
File "/home/mat/.virtualenvs/ogn-python/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1631, in _execute_20
return meth(self, args_10style, kwargs_10style, execution_options)
File "/home/mat/.virtualenvs/ogn-python/lib/python3.8/site-packages/sqlalchemy/sql/elements.py", line 332, in _execute_on_connection
return connection._execute_clauseelement(
File "/home/mat/.virtualenvs/ogn-python/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1498, in _execute_clauseelement
ret = self._execute_context(
File "/home/mat/.virtualenvs/ogn-python/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1862, in _execute_context
self._handle_dbapi_exception(
File "/home/mat/.virtualenvs/ogn-python/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 2043, in _handle_dbapi_exception
util.raise_(
File "/home/mat/.virtualenvs/ogn-python/lib/python3.8/site-packages/sqlalchemy/util/compat.py", line 208, in raise_
raise exception
File "/home/mat/.virtualenvs/ogn-python/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1819, in _execute_context
self.dialect.do_execute(
File "/home/mat/.virtualenvs/ogn-python/lib/python3.8/site-packages/sqlalchemy/engine/default.py", line 732, in do_execute
cursor.execute(statement, parameters)
sqlalchemy.exc.ProgrammingError: (psycopg2.errors.UndefinedTable) relation "flights" does not exist
LINE 2: INSERT INTO flights(date, sender_id, flight_type, mu...
^
So flights relation is missing. There's no flights.py in app/model. It looks like `flights2d.py' was removed in a18e6ae. I could try and re-create an appropriate table, but is this simply a file not committed to git?
The text was updated successfully, but these errors were encountered:
Trying to extract flights for today causes an exception:
So flights relation is missing. There's no
flights.py
inapp/model
. It looks like `flights2d.py' was removed in a18e6ae. I could try and re-create an appropriate table, but is this simply a file not committed to git?The text was updated successfully, but these errors were encountered: