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
except e._NO_TRACEBACK as ex:
> raise ex.with_traceback(None)
E sqlalchemy.exc.ProgrammingError: (psycopg.errors.SyntaxError) syntax error at or near "s"
E LINE 1: ...,'WW-13-WHH-946',5,'Research into Nurse, children's industry...
E ^
E [SQL: INSERT INTO test_315813624763377096677135540095373709572_legacy.topportunity (opportunity_id,oppnumber,revision_number,opptitle,owningagency,publisheruid,listed,oppcategory,initial_opportunity_id,modified_comments,created_date,last_upd_date,creator_id,last_upd_id,flag_2006,category_explanation,publisher_profile_id,is_draft) VALUES (106,'WW-13-WHH-946',5,'Research into Nurse, children's industry','USAID',NULL,NULL,'O',NULL,NULL,'2016-05-20T23:16:32.253768',NULL,NULL,NULL,NULL,'Whose whose story purpose none small.',NULL,'N')]
E (Background on this error at: https://sqlalche.me/e/20/f405)
/home/runner/.cache/pypoetry/virtualenvs/simpler-grants-gov-api-cCrPfAjT-py3.13/lib/python3.13/site-packages/psycopg/cursor.py:97: ProgrammingError
self = <psycopg.Cursor [closed] [INERROR] (host=grants-db database=app) at 0x7f3b158abb90>
query = "INSERT INTO test_315813624763377096677135540095373709572_legacy.topportunity (opportunity_id,oppnumber,revision_numbe...,NULL,'O',NULL,NULL,'2016-05-20T23:16:32.253768',NULL,NULL,NULL,NULL,'Whose whose story purpose none small.',NULL,'N')"
params = {}
def execute(
self,
query: Query,
params: Params | None = None,
*,
prepare: bool | None = None,
binary: bool | None = None,
) -> Self:
"""
Execute a query or command to the database.
"""
try:
with self._conn.lock:
self._conn.wait(
self._execute_gen(query, params, prepare=prepare, binary=binary)
)
except e._NO_TRACEBACK as ex:
> raise ex.with_traceback(None)
E psycopg.errors.SyntaxError: syntax error at or near "s"
E LINE 1: ...,'WW-13-WHH-946',5,'Research into Nurse, children's industry...
E ^
/home/runner/.cache/pypoetry/virtualenvs/simpler-grants-gov-api-cCrPfAjT-py3.13/lib/python3.13/site-packages/psycopg/cursor.py:97: SyntaxError
Reproducibility
I tried multiple times and saw the bug intermittently
How to reproduce the bug
Run make tests
Browser
Not applicable
Code of Conduct
I agree to follow this project's Code of Conduct
The text was updated successfully, but these errors were encountered:
## Summary
Fixes#3050
### Time to review: __2 mins__
## Changes proposed
Make sure we're escaping single quotes in our DB strings
## Context for reviewers
Tests started failing due to a string with "children's" in it
All tests are now passing locally
Summary
https://github.com/HHS/simpler-grants-gov/actions/runs/12035279047/job/33553855406#step:8:250
Reproducibility
I tried multiple times and saw the bug intermittently
How to reproduce the bug
Run make tests
Browser
Not applicable
Code of Conduct
The text was updated successfully, but these errors were encountered: