Open meystingray opened 1 year ago
Just for context, I noticed this error previous, when the Flask app is initializing:
`Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/sqlalchemy/engine/base.py", line 1900, in _execute_context self.dialect.do_execute(
File "/usr/local/lib/python3.8/dist-packages/sqlalchemy/engine/default.py", line 736, in do_execute cursor.execute(statement, parameters)
File "/usr/local/lib/python3.8/dist-packages/sqlalchemy/dialects/sqlite/aiosqlite.py", line 108, in execute self._adapt_connection._handle_exception(error)
File "/usr/local/lib/python3.8/dist-packages/sqlalchemy/dialects/sqlite/aiosqlite.py", line 236, in _handle_exception raise error
File "/usr/local/lib/python3.8/dist-packages/sqlalchemy/dialects/sqlite/aiosqlite.py", line 90, in execute self.await_(_cursor.execute(operation, parameters))
File "/usr/local/lib/python3.8/dist-packages/sqlalchemy/util/_concurrency_py3k.py", line 68, in await_only return current.driver.switch(awaitable)
File "/usr/local/lib/python3.8/dist-packages/sqlalchemy/util/_concurrency_py3k.py", line 121, in greenlet_spawn value = await result
File "/usr/local/lib/python3.8/dist-packages/aiosqlite/cursor.py", line 37, in execute await self._execute(self._cursor.execute, sql, parameters)
File "/usr/local/lib/python3.8/dist-packages/aiosqlite/cursor.py", line 31, in _execute return await self._conn._execute(fn, *args, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/aiosqlite/core.py", line 129, in _execute return await future
File "/usr/local/lib/python3.8/dist-packages/aiosqlite/core.py", line 102, in run result = function() sqlite3.OperationalError: no such table: flow_run`
OperationalError Exception raised for errors that are related to the database’s operation and not necessarily under the control of the programmer, e.g. an unexpected disconnect occurs, the data source name is not found, a transaction could not be processed, a memory allocation error occurred during processing, etc.
This error is a DBAPI Error and originates from the database driver (DBAPI), not SQLAlchemy itself.
The OperationalError is the most common (but not the only) error class used by drivers in the context of the database connection being dropped, or not being able to connect to the database. For tips on how to deal with this, see the section Dealing with Disconnects.
First check
Bug summary
Python 3.8.10 Prefect 2.6.8 Flask 2.0.2
I'm calling a Prefect 2 flow using Flask, and am consistently getting errors with the sqlite3 flow_run table such as:
table flow_run has no column named state_timestamp
Reproduction
Error
Versions
Additional context
No response