Skip to content

Python 3.12 incompatible? - requirements need update #334

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

Closed
bondyr3 opened this issue Jan 26, 2024 · 1 comment
Closed

Python 3.12 incompatible? - requirements need update #334

bondyr3 opened this issue Jan 26, 2024 · 1 comment

Comments

@bondyr3
Copy link

bondyr3 commented Jan 26, 2024

python= 3.12.1
databricks-sql-connector==2.9.3
Windows

Per https://docs.databricks.com/en/dev-tools/python-sql-connector.html,

Databricks SQL Connector for Python Requirements:
A development machine running Python >=3.8 and <=3.11.

thrift hangs on import ttypes
or

  File "<env>\Lib\site-packages\databricks\sql\client.py", line 670, in fetchall
    return self.active_result_set.fetchall()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<env>\Lib\site-packages\databricks\sql\client.py", line 944, in fetchall
    return self._convert_arrow_table(self.fetchall_arrow())
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<env>\Lib\site-packages\databricks\sql\client.py", line 884, in _convert_arrow_table  
    res = df.to_numpy(na_value=None)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<env>\Lib\site-packages\pandas\core\frame.py", line 1981, in to_numpy
    result = self._mgr.as_array(dtype=dtype, copy=copy, na_value=na_value)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<env>\Lib\site-packages\pandas\core\internals\managers.py", line 1702, in as_array    
    arr[isna(arr)] = na_value
    ~~~^^^^^^^^^^^
TypeError: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'

@bondyr3 bondyr3 changed the title Python 3.12 incompatible - requirements need update Python 3.12 incompatible? - requirements need update Jan 26, 2024
@susodapop
Copy link
Contributor

susodapop commented Jan 26, 2024

This is a duplicate of #326

You can workaround it by downgrading your local pandas installation to pandas==2.1.0.

Python 3.12 isn't the problem.

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

No branches or pull requests

2 participants