Zach Massia03/31/2023, 3:41 AM
? I keep running into
I'm getting a crash, which ends up hanging the terminal. On my Windows laptop I must close the terminal as
pyodbc.ProgrammingError: No results. Previous SQL was not a query.
does nothing (on Linux I get an even longer trace). I have been able to reproduce with a minimal ~30 line example. Here is the example code, it's output, as well as the longer trace from my full program: https://gist.github.com/ZachMassia/efe79e6853afdf20b367ff5bbd2825f3 Thanks in advance if anyone can point me in the right direction!
@task def query_db(con): print('Querying DB') results = con.cursor().execute('select top (1) * from raw.TRUCK').fetchall() return results