-
Notifications
You must be signed in to change notification settings - Fork 996
Bug: Undefined variable 's' in start_tasks.py causes NameError #3606
Copy link
Copy link
Closed
Description
Description: The tasks retry_errored_repos and create_collection_status_records in augur/tasks/start_tasks.py
use a variable s to create SQL text (e.g., s.sql.text), but the variable s (alias for sqlalchemy) is never imported or defined in the file. This results in a NameError crash every time these tasks are invoked.
How to reproduce:
- Clone the repository and install dependencies.
- Attempt to run or import augur.tasks.start_tasks.
- Invoke the retry_errored_repos function.
- The task will crash immediately with NameError.
- Expected behavior: The functions should successfully create SQLAlchemy
text - objects using the s.sql.text syntax and execute the updates/queries against the database.
Screenshots N/A (Internal Logic Bug)
Log files
text
Traceback (most recent call last):
...
File "/.../augur/tasks/start_tasks.py", line 342, in retry_errored_repos
query = s.sql.text(f"""UPDATE collection_status ...""")
NameError: name 's' is not defined
Software versions:
Augur: 0.91.0
OS: Ubuntu 24.04.3 LTS
Browser: N/A
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels