Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closing a newly-created cursor throws #428

Closed
1 task
batterseapower opened this issue Dec 4, 2023 · 1 comment · Fixed by #433
Closed
1 task

Closing a newly-created cursor throws #428

batterseapower opened this issue Dec 4, 2023 · 1 comment · Fixed by #433

Comments

@batterseapower
Copy link

Expected behavior

When you do this:

conn = trino.dbapi.connect(...)
cur = conn.cursor()
cur.close()

The close should succeed.

Actual behavior

The close actually fails:

trino.exceptions.OperationalError: Cancel query failed; no running query

Steps To Reproduce

conn = trino.dbapi.connect(...)
cur = conn.cursor()
cur.close()

Log output

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File ".../python3.10/site-packages/trino/dbapi.py", line 709, in close
    self.cancel()
  File ".../python3.10/site-packages/trino/dbapi.py", line 703, in cancel
    raise trino.exceptions.OperationalError(
trino.exceptions.OperationalError: Cancel query failed; no running query

Operating System

CentOS 8

Trino Python client version

0.327.0

Trino Server version

406

Python version

3.10.8

Are you willing to submit PR?

  • Yes I am willing to submit a PR!
@hashhar
Copy link
Member

hashhar commented Dec 21, 2023

Seems that it would be fixed by #405

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants