snowflake-sqlalchemy: Import of SnowflakeOCSPAsn1Crypto crashes Python

Please answer these questions before submitting your issue. Thanks!

  1. What version of Python are you using (python --version)?

Python 3.7.5

  1. What operating system and processor architecture are you using (python -c 'import platform; print(platform.platform())')?

Darwin-19.0.0-x86_64-i386-64bit

  1. What are the component versions in the environment (pip list)?

see attached log file

  1. What did you do? If possible, provide a recipe for reproducing the error. A complete runnable program is good.

from snowflake.connector.ocsp_asn1crypto import SnowflakeOCSPAsn1Crypto as SFOCSP

see attached log file for the complete process

  1. What did you expect to see?

  2. What did you see instead?

Python process crashes

  1. Can you set logging to DEBUG and collect the logs? log.txt

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 15 (7 by maintainers)

Most upvoted comments

@smtakeda this issue surfaced again with Big Sur beta

Stack is the following

  • python 3.7.6
  • Darwin-20.0.0-x86_64-i386-64bit
  • openssl 1.1
  • cffi==1.13.2
  • snowflake-connector-python==2.2.9

Same means of reproducibility as @ms32035 experienced

Also results in

~/.pyenv/versions/3.7.6/lib/python3.7/site-packages/oscrypto/_mac/_security_cffi.py in <module>
    237 security_path = find_library('Security')
    238 if not security_path:
--> 239     raise LibraryNotFoundError('The library Security could not be found')
    240
    241 Security = ffi.dlopen(security_path)

LibraryNotFoundError: The library Security could not be found

This fails locally

python -c 'from ctypes.util import find_library; assert find_library("c")'

But will work in

docker run 3.7-slim-stretch python -c 'from ctypes.util import find_library; assert find_library("c")'

Sounds like cmake’s find_library is on the loose on Big Sur

Some talk on it in oscrypto

Okay I fixed it using oscryto’s master. I recommend bumpiog the dependency to oscrypto once it’s shipped to pypi

pip install --upgrade git+https://github.com/wbond/oscrypto

ok, the warning was just covering up the actual problem. Traced the issue to be caused by this https://forums.developer.apple.com/thread/119429