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
Traceback (most recent call last):
File "/Users/apoclyps/workspace/src/select.py", line 4, in<module>
with sql.connect(
File "/Users/apoclyps/.pyenv/versions/3.10.3/lib/python3.10/site-packages/databricks/sql/__init__.py", line 47, in connect
from .client import Connection
File "/Users/apoclyps/.pyenv/versions/3.10.3/lib/python3.10/site-packages/databricks/sql/client.py", line 8, in<module>
import pandas
File "/Users/apoclyps/.pyenv/versions/3.10.3/lib/python3.10/site-packages/pandas/__init__.py", line 16, in<module>
raise ImportError(
ImportError: Unable to import required dependencies:
numpy: cannot import name 'Connection' from partially initialized module 'databricks.sql.client' (most likely due to a circular import) (/Users/apoclyps/.pyenv/versions/3.10.3/lib/python3.10/site-packages/databricks/sql/client.py)
I believe the issue is caused by the following * import causing a circular import between databricks.sql and databricks.sql.client in databricks/sql/client.py
The text was updated successfully, but these errors were encountered:
Thanks for opening this issue. It's not a circular import. Our connector depends on numpy which only added support for Python 3.10 on 22 June 22 in version 1.23.0. But we’re pinned to 1.21.1. I've created #26 to track the effort to implement support for Python 3.10.
For now the only mitigation is to use Python 3.7 - 3.9.
Issue
Attempting to follow the example from the Databricks SQL Connector for Python guide
produces a circular import error.
Steps to Reproduce
contents of
main.py
:Additional Information
I believe the issue is caused by the following
*
import causing a circular import betweendatabricks.sql
anddatabricks.sql.client
in databricks/sql/client.pyThe text was updated successfully, but these errors were encountered: