snowflake-connector-python: SNOW-750040: Failed to import ArrowResult. No Apache Arrow result set format can be used.

Please answer these questions before submitting your issue. Thanks!

  1. What version of Python are you using?

Python 3.11.2 (v3.11.2:878ead1ac1, Feb 7 2023, 10:02:41) [Clang 13.0.0 (clang-1300.0.29.30)]

  1. What operating system and processor architecture are you using?

macOS-13.2.1-arm64-arm-64bit

  1. What are the component versions in the environment (pip freeze)?
aiohttp==3.8.4
aiosignal==1.3.1
alembic==1.9.4
anyio==3.6.2
asn1crypto==1.5.1
asttokens==2.2.1
async-timeout==4.0.2
attrs==22.2.0
bcrypt==4.0.1
black==22.12.0
bugsnag==4.4.0
cachetools==5.3.0
certifi==2022.12.7
cffi==1.15.1
cfgv==3.3.1
charset-normalizer==2.1.1
click==8.1.3
commonmark==0.9.1
cryptography==39.0.1
devtools==0.9.0
distlib==0.3.6
ecdsa==0.18.0
executing==0.10.0
fastapi==0.89.1
filelock==3.9.0
frozenlist==1.3.3
google-api-core==2.11.0
google-auth==2.16.1
google-cloud-core==2.3.2
google-cloud-secret-manager==2.15.1
google-cloud-storage==2.7.0
google-crc32c==1.5.0
google-resumable-media==2.4.1
googleapis-common-protos==1.58.0
grpc-google-iam-v1==0.12.6
grpcio==1.51.3
grpcio-status==1.51.3
h11==0.14.0
identify==2.5.18
idna==3.4
Mako==1.2.4
MarkupSafe==2.1.2
more-itertools==9.0.0
multidict==6.0.4
mypy-extensions==1.0.0
nodeenv==1.7.0
oscrypto==1.3.0
packaging==23.0
passlib==1.7.4
pathspec==0.11.0
platformdirs==3.0.0
pluggy==0.13.1
pre-commit==2.21.0
proto-plus==1.22.2
protobuf==4.22.0
psycopg2==2.9.5
py==1.11.0
pyasn1==0.4.8
pyasn1-modules==0.2.8
pycparser==2.21
pycryptodomex==3.17
pydantic==1.10.5
Pygments==2.14.0
PyJWT==2.6.0
pyOpenSSL==23.0.0
pytest==5.4.3
python-dotenv==0.20.0
python-jose==3.3.0
python-multipart==0.0.5
pytz==2022.7.1
PyYAML==6.0
requests==2.28.2
rich==12.6.0
rsa==4.9
six==1.16.0
slack-sdk==3.20.0
sniffio==1.3.0
snowflake-connector-python==3.0.0
SQLAlchemy==1.4.46
starlette==0.22.0
typing_extensions==4.5.0
urllib3==1.26.14
uvicorn==0.20.0
virtualenv==20.19.0
wcwidth==0.2.6
WebOb==1.8.7
yarl==1.8.2
  1. What did you do?
Python 3.11.2 (v3.11.2:878ead1ac1, Feb  7 2023, 10:02:41) [Clang 13.0.0 (clang-1300.0.29.30)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import snowflake.connector
Failed to import ArrowResult. No Apache Arrow result set format can be used. ImportError: dlopen(/Users/niallwoodward/Library/Caches/pypoetry/virtualenvs/backend-Sy87x2_N-py3.11/lib/python3.11/site-packages/snowflake/connector/arrow_iterator.cpython-311-darwin.so, 0x0002): symbol not found in flat namespace '__ZN5arrow12ArrayBuilder12AppendScalarERKNS_6ScalarEx'
  1. What did you expect to see?

No error

  1. Can you set logging to DEBUG and collect the logs?
>>> import snowflake.connector
2023-02-26 09:53:22,157 - MainThread ssl_wrap_socket.py:43 - inject_into_urllib3() - DEBUG - Injecting ssl_wrap_socket_with_ocsp
2023-02-26 09:53:22,157 - MainThread _auth.py:91 - <module>() - DEBUG - cache directory: /Users/niallwoodward/Library/Caches/Snowflake
2023-02-26 09:53:22,209 - MainThread cursor.py:81 - <module>() - DEBUG - Failed to import pyarrow. Cannot use pandas fetch API
2023-02-26 09:53:22,210 - MainThread cursor.py:89 - <module>() - WARNING - Failed to import ArrowResult. No Apache Arrow result set format can be used. ImportError: dlopen(/Users/niallwoodward/Library/Caches/pypoetry/virtualenvs/backend-Sy87x2_N-py3.11/lib/python3.11/site-packages/snowflake/connector/arrow_iterator.cpython-311-darwin.so, 0x0002): symbol not found in flat namespace '__ZN5arrow12ArrayBuilder12AppendScalarERKNS_6ScalarEx'

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 18

Most upvoted comments

@NiallRees @mmaaartin @dmuraco we have updated .whl files on pypi. Can you check if things are working again for you

looks like a similar issue was hit on x86 arch when packages are installed via conda and pypi. Although this is not our case, I think ABI flags is a lead.

https://github.com/snowflakedb/snowflake-connector-python/issues/1426#issuecomment-1421051347

Installing from GitHub and therefore not using the snowflake-connector-python wheel removes this message for me too, but obviously not a solution:

➜  venvs rm -rdf venv
➜  venvs python -m venv venv
. ./venv/%
➜  venvs . ./venv/bin/activate
(venv) ➜  venvs pip install git+https://github.com/snowflakedb/snowflake-connector-python@main
Collecting git+https://github.com/snowflakedb/snowflake-connector-python@main
  Cloning https://github.com/snowflakedb/snowflake-connector-python (to revision main) to /private/var/folders/vw/56t0s0vd24d1c21c12gbylrm0000gn/T/pip-req-build-5100_txu
  Running command git clone --filter=blob:none --quiet https://github.com/snowflakedb/snowflake-connector-python /private/var/folders/vw/56t0s0vd24d1c21c12gbylrm0000gn/T/pip-req-build-5100_txu
  Resolved https://github.com/snowflakedb/snowflake-connector-python to commit be500a08735504971de59690d1c13eec9ec1f7d6
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting asn1crypto<2.0.0,>0.24.0
  Using cached asn1crypto-1.5.1-py2.py3-none-any.whl (105 kB)
Collecting cffi<2.0.0,>=1.9
  Using cached cffi-1.15.1-cp311-cp311-macosx_11_0_arm64.whl (174 kB)
Collecting cryptography<41.0.0,>=3.1.0
  Using cached cryptography-39.0.1-cp36-abi3-macosx_10_12_universal2.whl (5.4 MB)
Collecting oscrypto<2.0.0
  Using cached oscrypto-1.3.0-py2.py3-none-any.whl (194 kB)
Collecting pyOpenSSL<24.0.0,>=16.2.0
  Using cached pyOpenSSL-23.0.0-py3-none-any.whl (57 kB)
Collecting pycryptodomex!=3.5.0,<4.0.0,>=3.2
  Using cached pycryptodomex-3.17-cp35-abi3-macosx_10_9_universal2.whl (2.4 MB)
Collecting pyjwt<3.0.0
  Using cached PyJWT-2.6.0-py3-none-any.whl (20 kB)
Collecting pytz
  Using cached pytz-2022.7.1-py2.py3-none-any.whl (499 kB)
Collecting requests<3.0.0
  Using cached requests-2.28.2-py3-none-any.whl (62 kB)
Collecting packaging
  Using cached packaging-23.0-py3-none-any.whl (42 kB)
Collecting charset-normalizer<3,>=2
  Using cached charset_normalizer-2.1.1-py3-none-any.whl (39 kB)
Collecting idna<4,>=2.5
  Using cached idna-3.4-py3-none-any.whl (61 kB)
Collecting urllib3<1.27,>=1.21.1
  Using cached urllib3-1.26.14-py2.py3-none-any.whl (140 kB)
Collecting certifi>=2017.4.17
  Using cached certifi-2022.12.7-py3-none-any.whl (155 kB)
Collecting typing-extensions<5,>=4.3
  Using cached typing_extensions-4.5.0-py3-none-any.whl (27 kB)
Collecting filelock<4,>=3.5
  Using cached filelock-3.9.0-py3-none-any.whl (9.7 kB)
Collecting pycparser
  Using cached pycparser-2.21-py2.py3-none-any.whl (118 kB)
Building wheels for collected packages: snowflake-connector-python
  Building wheel for snowflake-connector-python (pyproject.toml) ... done
  Created wheel for snowflake-connector-python: filename=snowflake_connector_python-3.0.1-cp311-cp311-macosx_11_0_universal2.whl size=13861510 sha256=a4f8c1ed2e1e5edff48ef68b13bd7f3bb4d3a75ba87bf3d4f47c09f06212d4db
  Stored in directory: /private/var/folders/vw/56t0s0vd24d1c21c12gbylrm0000gn/T/pip-ephem-wheel-cache-xbcffypd/wheels/35/00/9b/a40f5cf4b096e91e168317bf14f7fe4a4a83d6166df2e431b8
Successfully built snowflake-connector-python
Installing collected packages: pytz, asn1crypto, urllib3, typing-extensions, pyjwt, pycryptodomex, pycparser, packaging, oscrypto, idna, filelock, charset-normalizer, certifi, requests, cffi, cryptography, pyOpenSSL, snowflake-connector-python
Successfully installed asn1crypto-1.5.1 certifi-2022.12.7 cffi-1.15.1 charset-normalizer-2.1.1 cryptography-39.0.1 filelock-3.9.0 idna-3.4 oscrypto-1.3.0 packaging-23.0 pyOpenSSL-23.0.0 pycparser-2.21 pycryptodomex-3.17 pyjwt-2.6.0 pytz-2022.7.1 requests-2.28.2 snowflake-connector-python-3.0.1 typing-extensions-4.5.0 urllib3-1.26.14

[notice] A new release of pip available: 22.3.1 -> 23.0.1
[notice] To update, run: pip install --upgrade pip
(venv) ➜  venvs python
Python 3.11.2 (v3.11.2:878ead1ac1, Feb  7 2023, 10:02:41) [Clang 13.0.0 (clang-1300.0.29.30)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import snowflake.connector