-
Notifications
You must be signed in to change notification settings - Fork 481
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
SNOW-909618: snowflake connector is erroring out on import using python 3.11 #1724
Comments
How weird, I wonder if this is caused by For what it's worth I tried reproing your issue myself in a virtualenv, but things just worked. Here's how I tried to reproduce: virtualenv -ppython3.11 venv311
. venv311/bin/activate
pip install -r /tmp/reqs.txt
python /tmp/s.py |
You don't mention what version of pipenv you're using. Also, while you mention that you're using Python 3.11, I see this in your output:
i.e. Python 3.9. While I personally prefer to use the |
I just tried to repro with the newest
|
FWIW we're also seeing this in a gh action on the same repo, in python3.11. The github action runs on ubuntu-22.04 so we're using __________ ERROR collecting automatcher/tests/test_PrepareDataATM.py ___________
yext_ds_common/automatcher/tests/test_PrepareDataATM.py:12: in <module>
import snowflake.connector as connector
../../../.local/share/virtualenvs/yext_ds_common-btVlcoZc/lib/python3.11/site-packages/snowflake/connector/__init__.py:17: in <module>
from .connection import SnowflakeConnection
../../../.local/share/virtualenvs/yext_ds_common-btVlcoZc/lib/python3.11/site-packages/snowflake/connector/connection.py:30: in <module>
from . import errors, proxy
../../../.local/share/virtualenvs/yext_ds_common-btVlcoZc/lib/python3.11/site-packages/snowflake/connector/errors.py:15: in <module>
from .compat import BASE_EXCEPTION_CLASS
../../../.local/share/virtualenvs/yext_ds_common-btVlcoZc/lib/python3.11/site-packages/snowflake/connector/compat.py:19: in <module>
from . import constants
../../../.local/share/virtualenvs/yext_ds_common-btVlcoZc/lib/python3.11/site-packages/snowflake/connector/constants.py:12: in <module>
from .options import pyarrow as pa
../../../.local/share/virtualenvs/yext_ds_common-btVlcoZc/lib/python3.11/site-packages/snowflake/connector/options.py:1[30](https://github.com/yext/yext_ds_common/actions/runs/6161835934/job/16721961863?pr=38#step:6:31): in <module>
pandas, pyarrow, installed_pandas = _import_or_missing_pandas_option()
../../../.local/share/virtualenvs/yext_ds_common-btVlcoZc/lib/python3.11/site-packages/snowflake/connector/options.py:83: in _import_or_missing_pandas_option
installed_packages = {
../../../.local/share/virtualenvs/yext_ds_common-btVlcoZc/lib/python3.11/site-packages/snowflake/connector/options.py:83: in <dictcomp>
installed_packages = {
/opt/hostedtoolcache/Python/3.11.5/x64/lib/python3.11/importlib/metadata/__init__.py:915: in <genexpr>
path.search(prepared) for path in map(FastPath, paths)
/opt/hostedtoolcache/Python/3.11.5/x64/lib/python3.11/importlib/metadata/__init__.py:813: in search
return self.lookup(self.mtime).search(name)
/opt/hostedtoolcache/Python/3.11.5/x64/lib/python3.11/importlib/metadata/__init__.py:818: in mtime
return os.stat(self.root).st_mtime
E TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType The github action env: env:
pythonLocation: /opt/hostedtoolcache/Python/3.11.[5](https://github.com/yext/yext_ds_common/actions/runs/6161835934/job/16721961863?pr=38#step:6:5)/x[6](https://github.com/yext/yext_ds_common/actions/runs/6161835934/job/16721961863?pr=38#step:6:6)4
PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.11.5/x64/lib/pkgconfig
Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.5/x64
Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.5/x64
Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.5/x64
LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.11.5/x64/lib To be clear this happens during the test collection phase of running the relevant |
Not sure if I'm looking in the correct repo but it looks like here: https://github.com/python/importlib_metadata/blob/main/importlib_metadata/__init__.py#L709 it's checking for OSError but here a TypeError is raised b/c the input is None. |
This thread looks relevant |
it's also possible this is a pytest issue, e.g. that also seems to exhibit similar behavior EDIT: Will double back to this but need to focus on smth else for a bit |
I looked into this a bit more. IIUC what's happening is a result of this python bug which is described here: |
Issue link after migration to GitHub: python/cpython#91216 |
@lroberts7 are you still seeing the issue or it's fixed in your env already? |
IIRC we fixed this issue via: https://community.snowflake.com/s/article/Python-Connector-fails-to-connect-with-LibraryNotFoundError-Error-detecting-the-version-of-libcrypto#openssl |
closing assuming the issue is already fixed, feel free to reopen if the issue still exists |
Python version
3.11.4
Operating system and processor architecture
macOS-13.2.1-arm64-arm-64bit
Installed packages
What did you do?
What did you expect to see?
Expected it to run normally given this works locally, just not on github.
Can you set logging to DEBUG and collect the logs?
The text was updated successfully, but these errors were encountered: