Tim Galvin
03/25/2025, 8:02 AMflow
. I am doing this inside a docker container. My test fails in the container with the following error:
FAILED tests/test_prefect_helpers.py::test_enable_loguru_support - sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) no such column: "Debug Print Notification" - should this be a string literal in single-quotes?
@Marvin - what is going wrong and causing the error?Marvin
03/25/2025, 8:03 AM(sqlite3.OperationalError) no such column: "Debug Print Notification"
, is likely due to an issue with the SQLite database schema used by Prefect within your Docker container. This specific error seems related to a migration or schema update that didn't apply correctly, possibly due to quoting issues in SQL commands.
### What Might Be Happening:
1. Quoting Issue: Older versions of SQLite or SQLAlchemy might not handle double quotes correctly for string literals, which is what the error message suggests. The correct syntax should use single quotes for string literals in SQL queries.
2. Migration Issue: There have been issues reported where migrations fail due to quoting problems. This is particularly relevant if you're using an ephemeral Prefect server with SQLite, as recent changes in SQLite might have made it stricter with quoting.
### Potential Solutions:
- Single Quotes: Ensure that any direct SQL queries in your code or migrations use single quotes for string literals. This might involve modifying the Prefect source or migration scripts if you're running from source or a custom build.
- Database Initialization: If possible, try reinitializing the database to ensure all migrations are correctly applied. This can be done by removing the existing SQLite database file and allowing Prefect to recreate it.
- Update Dependencies: Ensure that your Prefect version and its dependencies are up-to-date, as newer versions might have fixed these quoting issues.
For more context, you can refer to related GitHub issues and pull requests that discuss similar problems.
If the problem persists, consider raising an issue with detailed logs and environment information on the Prefect GitHub repository.Tim Galvin
03/25/2025, 8:57 AMMarvin
03/25/2025, 8:57 AM