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

sqlalchemy: TypeError: cannot create weak reference to 'pyodbc.Cursor' object #460

Closed
jomasti opened this issue Apr 20, 2021 · 2 comments · Fixed by #469
Closed

sqlalchemy: TypeError: cannot create weak reference to 'pyodbc.Cursor' object #460

jomasti opened this issue Apr 20, 2021 · 2 comments · Fixed by #469
Assignees
Labels
bug Something isn't working triaged

Comments

@jomasti
Copy link
Contributor

jomasti commented Apr 20, 2021

Describe your environment
See the repo provided below for a simple reproduction environment. I was using Python 3.8.8 when running it locally.

Steps to reproduce
Provided a reproduction repo: https://github.com/jomasti/opentelemetry-instrumentation-sqlalchemy-pyodbc-bug

What is the expected behavior?
I expected the query to work successfully when the engine is instrumented. The code in the repo above works fine with 0.18b1.

What is the actual behavior?
Ran into TypeError: cannot create weak reference to 'pyodbc.Cursor' object.

Additional context
#315 appears to be the culprit.

@jomasti jomasti added the bug Something isn't working label Apr 20, 2021
@ewolz3
Copy link

ewolz3 commented May 4, 2021

For reference, I have the same error when I try to instrument SQLAlchemy used with an Oracle database.

2021-05-04T10:57:11.571-04:00 [ERR] self.data[ref(key, self._remove)] = value
2021-05-04T10:57:11.571-04:00 [ERR] TypeError: cannot create weak reference to 'cx_Oracle.Cursor' object

@github-actions
Copy link

github-actions bot commented Jun 4, 2021

This issue was marked stale due to lack of activity. It will be closed in 30 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triaged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants