Mitch
01/15/2025, 1:07 AMFile "/usr/local/lib/python3.11/dist-packages/aiosqlite/cursor.py", line 48, in execute
await self._execute(self._cursor.execute, sql, parameters)
File "/usr/local/lib/python3.11/dist-packages/aiosqlite/cursor.py", line 40, in _execute
return await self._conn._execute(fn, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/aiosqlite/core.py", line 132, in _execute
return await future
^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/aiosqlite/core.py", line 115, in run
result = function()
^^^^^^^^^^
sqlite3.OperationalError: no such table: json_each
Marvin
01/15/2025, 1:07 AMsqlite3.OperationalError: no such table: json_each
, indicates that the SQLite database is trying to access a table named json_each
, which does not exist. This might be due to a few reasons:
1. Incorrect SQL Query: You might be using a function or a table name in your SQL query that doesn't exist in your database schema. The json_each
is a table-valued function available in SQLite for JSON processing, but it requires SQLite to be compiled with JSON1 extension.
2. SQLite Version: Ensure that your SQLite version supports the JSON1 extension. You can check your SQLite version and whether it supports JSON1 by running SELECT sqlite_version();
and checking the documentation for that version.
3. Database Schema: Double-check your database schema to ensure that you're using the correct table names and that all necessary tables and functions are available.
To resolve this issue:
- Verify that your SQLite version includes JSON1 support. You might need to upgrade or recompile SQLite with the appropriate configuration.
- Ensure your SQL query is correctly using json_each()
as part of a valid JSON1 operation.
- Confirm that the database connection is pointing to the correct database file that contains the expected schema.
If you need further assistance, it might be helpful to provide the SQL query you're using and any relevant context about your database setup.Mitch
01/15/2025, 1:09 AM17:01:19.531 | WARNING | asyncio - Executing <Task pending name='Task-4' coro=<Call._run_async() running at /usr/local/lib/python3.11/dist-packages/prefect/_internal/concurrency/calls.py:389> cb=[Call.run.<locals>.<lambda>() at /usr/local/lib/python3.11/dist-packages/prefect/_internal/concurrency/calls.py:300, Task.task_wakeup()] created at /usr/local/lib/python3.11/dist-packages/prefect/_internal/concurrency/calls.py:294> took 0.150 seconds
/usr/lib/python3.11/contextlib.py:144: SAWarning: Skipped unsupported reflection of expression-based index ix_flow_run__coalesce_start_time_expected_start_time_desc
next(self.gen)
/usr/lib/python3.11/contextlib.py:144: SAWarning: Skipped unsupported reflection of expression-based index ix_flow_run__coalesce_start_time_expected_start_time_asc
next(self.gen)
17:01:22.825 | WARNING | asyncio - Executing <Task pending name='Task-7' coro=<apply_migrations() running at /usr/local/lib/python3.11/dist-packages/prefect/server/database/migrations/env.py:169> wait_for=<Future pending cb=[Task.task_wakeup()] created at /usr/lib/python3.11/asyncio/base_events.py:428> cb=[_chain_future.<locals>._call_set_state() at /usr/lib/python3.11/asyncio/futures.py:394] created at /usr/lib/python3.11/asyncio/tasks.py:680> took 0.131 seconds
Marvin
01/15/2025, 1:09 AMMitch
01/15/2025, 1:09 AM17:01:19.531 | WARNING | asyncio - Executing <Task pending name='Task-4' coro=<Call._run_async() running at /usr/local/lib/python3.11/dist-packages/prefect/_internal/concurrency/calls.py:389> cb=[Call.run.<locals>.<lambda>() at /usr/local/lib/python3.11/dist-packages/prefect/_internal/concurrency/calls.py:300, Task.task_wakeup()] created at /usr/local/lib/python3.11/dist-packages/prefect/_internal/concurrency/calls.py:294> took 0.150 seconds
/usr/lib/python3.11/contextlib.py:144: SAWarning: Skipped unsupported reflection of expression-based index ix_flow_run__coalesce_start_time_expected_start_time_desc
next(self.gen)
/usr/lib/python3.11/contextlib.py:144: SAWarning: Skipped unsupported reflection of expression-based index ix_flow_run__coalesce_start_time_expected_start_time_asc
next(self.gen)
Marvin
01/15/2025, 1:10 AMjson_each
Error:
- This error is related to SQLite's JSON1 extension, which Prefect might be using for certain operations. It appears when Prefect tries to use JSON functions that aren't supported in your SQLite version.
- Solution: Ensure that your SQLite version supports the JSON1 extension. You might need to upgrade SQLite or switch to a database backend that fully supports JSON operations, such as PostgreSQL.
- Related GitHub Issues:
- SQLite ‘no such table: json_each’ error during notification check
- OperationalError on first start
2. SQLAlchemy Reflection Warning:
- The warning about "Skipped unsupported reflection of expression-based index" indicates that SQLAlchemy is unable to reflect certain indexes in your database schema.
- Solution: These warnings are typically benign and can often be ignored unless they cause functional issues. However, reviewing your database schema and updating SQLAlchemy might help.
- Related GitHub Issue:
- SQLAlchemy warning for `ix_flow_run__coalesce_start_time_expected_start_time_asc`
3. General Recommendations:
- Consider migrating to a different database backend like PostgreSQL if SQLite's limitations are causing persistent issues.
- Keep Prefect and its dependencies up to date to benefit from fixes and improvements related to these issues.
If these steps do not resolve the issues, you might want to follow up on the GitHub issues linked above or consider reaching out to the Prefect community for further assistance.