-
Notifications
You must be signed in to change notification settings - Fork 169
Description
Please answer these questions before submitting your issue. Thanks!
- What version of Python are you using?
Python 3.11.11 (main, Feb 12 2025, 18:39:07) [Clang 16.0.0 (clang-1600.0.26.6)]
- What operating system and processor architecture are you using?
macOS-15.4.1-arm64-arm-64bit
- What are the component versions in the environment (
pip freeze)?
asn1crypto==1.5.1
boto3==1.38.19
botocore==1.38.19
certifi==2025.4.26
cffi==1.17.1
charset-normalizer==3.4.2
cryptography==45.0.2
filelock==3.18.0
idna==3.10
jmespath==1.0.1
packaging==25.0
platformdirs==4.3.8
pycparser==2.22
PyJWT==2.10.1
pyOpenSSL==25.1.0
python-dateutil==2.9.0.post0
pytz==2025.2
requests==2.32.3
s3transfer==0.12.0
six==1.17.0
snowflake-connector-python==3.15.0
snowflake-sqlalchemy==1.7.3
sortedcontainers==2.4.0
SQLAlchemy==2.0.41
tomlkit==0.13.2
typing_extensions==4.13.2
urllib3==2.4.0
- What did you do?
I created a new virtual environment and installed my dependencies via pip install sqlalchemy snowflake-sqlalchemy. You can see the actual dependencies installed in question 3.
The script reproduces the error. You will need to substitute a valid connection string.
import warnings
warnings.simplefilter('always')
import sqlalchemy as sa
engine = sa.create_engine('snowflake://<USER>:<PASSWORD>@<ACCOUNT>/<DATABASE>/<SCHEMA>?warehouse=<WAREHOUSE>&role=<ROLE>')
engine.connect()
- What did you expect to see?
I expected to connect to snowflake without any errors or warnings.
What should have happened and what happened instead?
I see this warning produced multiple times after the call to engine.connect():
/my/path/to/venv/lib/python3.11/site-packages/snowflake/connector/vendored/urllib3/contrib/pyopenssl.py:434: DeprecationWarning: Attempting to mutate a Context after a Connection was created. In the future, this will raise an exception
self._ctx.set_options(value)
These warning messages start in pyOpenSSL==25.1.0. If I downgrade to 25.0.0, I do not see these warnings.
-
Can you set logging to DEBUG and collect the logs?
import logging import os for logger_name in ['snowflake.sqlalchemy', 'snowflake.connector']: logger = logging.getLogger(logger_name) logger.setLevel(logging.DEBUG) ch = logging.StreamHandler() ch.setLevel(logging.DEBUG) ch.setFormatter(logging.Formatter('%(asctime)s - %(threadName)s %(filename)s:%(lineno)d - %(funcName)s() - %(levelname)s - %(message)s')) logger.addHandler(ch)
Logs are:
2025-05-19 16:11:47,449 - MainThread ssl_wrap_socket.py:40 - inject_into_urllib3() - DEBUG - Injecting ssl_wrap_socket_with_ocsp
2025-05-19 16:11:57,179 - MainThread connection.py:486 - __init__() - INFO - Snowflake Connector for Python Version: 3.15.0, Python Version: 3.11.11, Platform: macOS-15.4.1-arm64-arm-64bit
2025-05-19 16:11:57,179 - MainThread connection.py:860 - connect() - DEBUG - connect
2025-05-19 16:11:57,180 - MainThread connection.py:1308 - __config() - DEBUG - __config
2025-05-19 16:11:57,180 - MainThread connection.py:1391 - __config() - INFO - Connecting to GLOBAL Snowflake domain
2025-05-19 16:11:57,180 - MainThread connection.py:1508 - __config() - DEBUG - This connection is in OCSP Fail Open Mode. TLS Certificates would be checked for validity and revocation status. Any other Certificate Revocation related exceptions or OCSP Responder failures would be disregarded in favor of connectivity.
2025-05-19 16:11:57,180 - MainThread converter.py:155 - __init__() - DEBUG - use_numpy: False
2025-05-19 16:11:57,180 - MainThread connection.py:1072 - __open_connection() - DEBUG - REST API object was created: XXXX.snowflakecomputing.com:443
2025-05-19 16:11:57,180 - MainThread _auth.py:144 - authenticate() - DEBUG - authenticate
2025-05-19 16:11:57,180 - MainThread _auth.py:184 - authenticate() - DEBUG - account=XXXXX, user=XXXX, database=XXXX, schema=XXXXXX, warehouse=XXXXX, role=XXXXX, request_id=a708f5f5-3a50-47b2-a8d7-aa4f8d6b1cc9
2025-05-19 16:11:57,180 - MainThread _auth.py:217 - authenticate() - DEBUG - body['data']: {'CLIENT_APP_ID': 'SnowflakeSQLAlchemy', 'CLIENT_APP_VERSION': '1.7.3', 'SVN_REVISION': None, 'ACCOUNT_NAME': 'XXXX', 'LOGIN_NAME': 'XXXX', 'CLIENT_ENVIRONMENT': {'APPLICATION': 'SnowflakeSQLAlchemy', 'OS': 'Darwin', 'OS_VERSION': 'macOS-15.4.1-arm64-arm-64bit', 'PYTHON_VERSION': '3.11.11', 'PYTHON_RUNTIME': 'CPython', 'PYTHON_COMPILER': 'Clang 16.0.0 (clang-1600.0.26.6)', 'OCSP_MODE': 'FAIL_OPEN', 'TRACING': 10, 'LOGIN_TIMEOUT': None, 'NETWORK_TIMEOUT': None, 'SOCKET_TIMEOUT': None}, 'PASSWORD': '******', 'SESSION_PARAMETERS': {'AUTOCOMMIT': False, 'CLIENT_PREFETCH_THREADS': 4}}
2025-05-19 16:11:57,181 - MainThread retry.py:351 - from_int() - DEBUG - Converted retries value: 1 -> Retry(total=1, connect=None, read=None, redirect=None, status=None)
2025-05-19 16:11:57,181 - MainThread retry.py:351 - from_int() - DEBUG - Converted retries value: 1 -> Retry(total=1, connect=None, read=None, redirect=None, status=None)
2025-05-19 16:11:57,181 - MainThread network.py:1232 - _use_requests_session() - DEBUG - Session status for SessionPool 'XXXX.snowflakecomputing.com', SessionPool 1/1 active sessions
2025-05-19 16:11:57,181 - MainThread network.py:906 - _request_exec_wrapper() - DEBUG - remaining request timeout: N/A ms, retry cnt: 1
2025-05-19 16:11:57,181 - MainThread network.py:888 - add_request_guid() - DEBUG - Request guid: 48da964a-2a37-40ad-bb29-1e77b7ff39d7
2025-05-19 16:11:57,181 - MainThread network.py:1078 - _request_exec() - DEBUG - socket timeout: 60
2025-05-19 16:11:57,183 - MainThread connectionpool.py:1019 - _new_conn() - DEBUG - Starting new HTTPS connection (1): XXXX.snowflakecomputing.com:443
/Users/bill/Temp/venv/lib/python3.11/site-packages/snowflake/connector/vendored/urllib3/contrib/pyopenssl.py:434: DeprecationWarning: Attempting to mutate a Context after a Connection was created. In the future, this will raise an exception
self._ctx.set_options(value)
/Users/bill/Temp/venv/lib/python3.11/site-packages/snowflake/connector/vendored/urllib3/contrib/pyopenssl.py:442: DeprecationWarning: Attempting to mutate a Context after a Connection was created. In the future, this will raise an exception
self._ctx.set_verify(_stdlib_to_openssl_verify[value], _verify_callback)
/Users/bill/Temp/venv/lib/python3.11/site-packages/snowflake/connector/vendored/urllib3/contrib/pyopenssl.py:442: DeprecationWarning: Attempting to mutate a Context after a Connection was created. In the future, this will raise an exception
self._ctx.set_verify(_stdlib_to_openssl_verify[value], _verify_callback)
/Users/bill/Temp/venv/lib/python3.11/site-packages/snowflake/connector/vendored/urllib3/contrib/pyopenssl.py:458: DeprecationWarning: Attempting to mutate a Context after a Connection was created. In the future, this will raise an exception
self._ctx.load_verify_locations(cafile, capath)
/Users/bill/Temp/venv/lib/python3.11/site-packages/snowflake/connector/vendored/urllib3/contrib/pyopenssl.py:474: DeprecationWarning: Attempting to mutate a Context after a Connection was created. In the future, this will raise an exception
return self._ctx.set_alpn_protos(protocols)
2025-05-19 16:11:57,430 - MainThread ssl_wrap_socket.py:75 - ssl_wrap_socket_with_ocsp() - DEBUG - OCSP Mode: FAIL_OPEN, OCSP response cache file name: None
2025-05-19 16:11:57,458 - MainThread ocsp_snowflake.py:647 - reset_cache_dir() - DEBUG - cache directory: /Users/bill/Library/Caches/Snowflake
2025-05-19 16:11:57,458 - MainThread ocsp_snowflake.py:685 - reset_ocsp_response_cache_uri() - DEBUG - ocsp_response_cache_uri: file:///Users/bill/Library/Caches/Snowflake/ocsp_response_cache.json
2025-05-19 16:11:57,458 - MainThread ocsp_snowflake.py:688 - reset_ocsp_response_cache_uri() - DEBUG - OCSP_VALIDATION_CACHE size: 400
2025-05-19 16:11:57,458 - MainThread ocsp_snowflake.py:484 - reset_ocsp_dynamic_cache_server_url() - DEBUG - OCSP response cache server is enabled: http://ocsp.snowflakecomputing.com/ocsp_response_cache.json
2025-05-19 16:11:57,458 - MainThread ocsp_snowflake.py:497 - reset_ocsp_dynamic_cache_server_url() - DEBUG - OCSP dynamic cache server RETRY URL: None
2025-05-19 16:11:57,458 - MainThread ocsp_snowflake.py:1126 - validate() - DEBUG - validating certificate: XXXXX.snowflakecomputing.com
2025-05-19 16:11:57,458 - MainThread ocsp_asn1crypto.py:398 - extract_certificate_chain() - DEBUG - # of certificates: 3
2025-05-19 16:11:57,458 - MainThread ocsp_asn1crypto.py:87 - read_cert_bundle() - DEBUG - reading certificate bundle: /Users/bill/Temp/venv/lib/python3.11/site-packages/certifi/cacert.pem
2025-05-19 16:11:57,463 - MainThread ocsp_asn1crypto.py:403 - extract_certificate_chain() - DEBUG - subject: OrderedDict([('country_name', 'US'), ('state_or_province_name', 'Montana'), ('locality_name', 'Bozeman'), ('organization_name', 'Snowflake Inc.'), ('common_name', '*.va2.us-east-1.aws.snowflakecomputing.com')]), issuer: OrderedDict([('country_name', 'US'), ('organization_name', 'DigiCert Inc'), ('common_name', 'DigiCert Global G2 TLS RSA SHA256 2020 CA1')])
2025-05-19 16:11:57,464 - MainThread ocsp_asn1crypto.py:403 - extract_certificate_chain() - DEBUG - subject: OrderedDict([('country_name', 'US'), ('organization_name', 'DigiCert Inc'), ('common_name', 'DigiCert Global G2 TLS RSA SHA256 2020 CA1')]), issuer: OrderedDict([('country_name', 'US'), ('organization_name', 'DigiCert Inc'), ('organizational_unit_name', 'www.digicert.com'), ('common_name', 'DigiCert Global Root G2')])
2025-05-19 16:11:57,464 - MainThread ocsp_asn1crypto.py:408 - extract_certificate_chain() - DEBUG - A trusted root certificate found: OrderedDict([('country_name', 'US'), ('organization_name', 'DigiCert Inc'), ('common_name', 'DigiCert Global G2 TLS RSA SHA256 2020 CA1')]), stopping chain traversal here
2025-05-19 16:11:57,464 - MainThread ocsp_asn1crypto.py:432 - create_pair_issuer_subject() - DEBUG - not found issuer_der: OrderedDict([('country_name', 'US'), ('organization_name', 'DigiCert Inc'), ('organizational_unit_name', 'www.digicert.com'), ('common_name', 'DigiCert Global Root G2')])
2025-05-19 16:11:57,465 - MainThread ocsp_snowflake.py:885 - find_cache() - DEBUG - hit cache for subject: OrderedDict([('country_name', 'US'), ('state_or_province_name', 'Montana'), ('locality_name', 'Bozeman'), ('organization_name', 'Snowflake Inc.'), ('common_name', '*.va2.us-east-1.aws.snowflakecomputing.com')])
2025-05-19 16:11:57,465 - MainThread ocsp_snowflake.py:885 - find_cache() - DEBUG - hit cache for subject: OrderedDict([('country_name', 'US'), ('organization_name', 'DigiCert Inc'), ('common_name', 'DigiCert Global G2 TLS RSA SHA256 2020 CA1')])
2025-05-19 16:11:57,466 - MainThread ocsp_snowflake.py:1183 - _validate() - DEBUG - ok
2025-05-19 16:11:57,773 - MainThread connectionpool.py:474 - _make_request() - DEBUG - https://XXXXX.snowflakecomputing.com:443 "POST /session/v1/login-request?request_id=a708f5f5-3a50-47b2-a8d7-aa4f8d6b1cc9&databaseName=XXXX&schemaName=XXXX&warehouse=XXXX&roleName=XXXX&request_guid=48da964a-2a37-40ad-bb29-1e77b7ff39d7 HTTP/1.1" 200 6147
2025-05-19 16:11:57,774 - MainThread network.py:1105 - _request_exec() - DEBUG - SUCCESS
2025-05-19 16:11:57,775 - MainThread network.py:1237 - _use_requests_session() - DEBUG - Session status for SessionPool 'XXXX.snowflakecomputing.com', SessionPool 0/1 active sessions
2025-05-19 16:11:57,775 - MainThread network.py:770 - _post_request() - DEBUG - ret[code] = None, after post request
2025-05-19 16:11:57,775 - MainThread _auth.py:347 - authenticate() - DEBUG - completed authentication
2025-05-19 16:11:57,775 - MainThread _auth.py:406 - authenticate() - DEBUG - token = ******
2025-05-19 16:11:57,775 - MainThread _auth.py:414 - authenticate() - DEBUG - master_token = ******
2025-05-19 16:11:57,775 - MainThread _auth.py:422 - authenticate() - DEBUG - id_token = NULL
2025-05-19 16:11:57,775 - MainThread _auth.py:430 - authenticate() - DEBUG - mfa_token = NULL
2025-05-19 16:11:57,777 - MainThread connection.py:990 - cursor() - DEBUG - cursor
2025-05-19 16:11:57,777 - MainThread cursor.py:945 - execute() - DEBUG - executing SQL/command
2025-05-19 16:11:57,777 - MainThread cursor.py:964 - execute() - DEBUG - query: [ALTER SESSION SET autocommit=False]
2025-05-19 16:11:57,777 - MainThread cursor.py:797 - _preprocess_pyformat_query() - DEBUG - binding: [ALTER SESSION SET autocommit=False] with input=[None], processed=[{}]
2025-05-19 16:11:57,777 - MainThread connection.py:1886 - _next_sequence_counter() - DEBUG - sequence counter: 1
2025-05-19 16:11:57,777 - MainThread cursor.py:666 - _execute_helper() - DEBUG - Request id: 08fd9529-6f3e-43eb-851f-c804c595a1c4
2025-05-19 16:11:57,777 - MainThread cursor.py:668 - _execute_helper() - DEBUG - running query [ALTER SESSION SET autocommit=False]
2025-05-19 16:11:57,778 - MainThread cursor.py:675 - _execute_helper() - DEBUG - is_file_transfer: True
2025-05-19 16:11:57,778 - MainThread connection.py:1541 - cmd_query() - DEBUG - _cmd_query
2025-05-19 16:11:57,778 - MainThread _query_context_cache.py:152 - serialize_to_dict() - DEBUG - serialize_to_dict() called
2025-05-19 16:11:57,778 - MainThread connection.py:1570 - cmd_query() - DEBUG - sql=[ALTER SESSION SET autocommit=False], sequence_id=[1], is_file_transfer=[False]
2025-05-19 16:11:57,779 - MainThread network.py:504 - request() - DEBUG - Opentelemtry otel injection failed
Traceback (most recent call last):
File "/Users/bill/Temp/venv/lib/python3.11/site-packages/snowflake/connector/network.py", line 498, in request
from opentelemetry.trace.propagation.tracecontext import (
ModuleNotFoundError: No module named 'opentelemetry'
2025-05-19 16:11:57,782 - MainThread network.py:1232 - _use_requests_session() - DEBUG - Session status for SessionPool 'XXXX.snowflakecomputing.com', SessionPool 1/1 active sessions
2025-05-19 16:11:57,782 - MainThread network.py:906 - _request_exec_wrapper() - DEBUG - remaining request timeout: N/A ms, retry cnt: 1
2025-05-19 16:11:57,782 - MainThread network.py:888 - add_request_guid() - DEBUG - Request guid: a540678a-eeb4-41f5-a3b0-e0ebb264da74
2025-05-19 16:11:57,782 - MainThread network.py:1078 - _request_exec() - DEBUG - socket timeout: 60
2025-05-19 16:11:57,912 - MainThread connectionpool.py:474 - _make_request() - DEBUG - https://XXXX.snowflakecomputing.com:443 "POST /queries/v1/query-request?requestId=08fd9529-6f3e-43eb-851f-c804c595a1c4&request_guid=a540678a-eeb4-41f5-a3b0-e0ebb264da74 HTTP/1.1" 200 None
2025-05-19 16:11:57,914 - MainThread network.py:1105 - _request_exec() - DEBUG - SUCCESS
2025-05-19 16:11:57,914 - MainThread network.py:1237 - _use_requests_session() - DEBUG - Session status for SessionPool 'XXXX.snowflakecomputing.com', SessionPool 0/1 active sessions
2025-05-19 16:11:57,914 - MainThread network.py:770 - _post_request() - DEBUG - ret[code] = None, after post request
2025-05-19 16:11:57,914 - MainThread network.py:796 - _post_request() - DEBUG - Query id: 01bc764f-0515-49a9-0010-f4032b2e42f2
2025-05-19 16:11:57,914 - MainThread _query_context_cache.py:188 - deserialize_json_dict() - DEBUG - deserialize_json_dict() called: data from server: {'entries': [{'id': 0, 'timestamp': 1747696317910936, 'priority': 0, 'context': 'CKbN1IIw'}]}
2025-05-19 16:11:57,915 - MainThread _query_context_cache.py:229 - deserialize_json_dict() - DEBUG - deserialize {'id': 0, 'timestamp': 1747696317910936, 'priority': 0, 'context': 'CKbN1IIw'}
2025-05-19 16:11:57,915 - MainThread _query_context_cache.py:98 - _sync_priority_map() - DEBUG - sync_priority_map called priority_map size = 0, new_priority_map size = 1
2025-05-19 16:11:57,915 - MainThread _query_context_cache.py:124 - trim_cache() - DEBUG - trim_cache() called. treeSet size is 1 and cache capacity is 5
2025-05-19 16:11:57,915 - MainThread _query_context_cache.py:133 - trim_cache() - DEBUG - trim_cache() returns. treeSet size is 1 and cache capacity is 5
2025-05-19 16:11:57,915 - MainThread _query_context_cache.py:268 - deserialize_json_dict() - DEBUG - deserialize_json_dict() returns
2025-05-19 16:11:57,915 - MainThread _query_context_cache.py:273 - log_cache_entries() - DEBUG - Cache Entry: (0, 1747696317910936, 0)
2025-05-19 16:11:57,915 - MainThread cursor.py:1022 - execute() - DEBUG - sfqid: 01bc764f-0515-49a9-0010-f4032b2e42f2
2025-05-19 16:11:57,915 - MainThread cursor.py:1028 - execute() - DEBUG - query execution done
2025-05-19 16:11:57,915 - MainThread cursor.py:1042 - execute() - DEBUG - SUCCESS
2025-05-19 16:11:57,916 - MainThread cursor.py:1061 - execute() - DEBUG - PUT OR GET: False
2025-05-19 16:11:57,916 - MainThread cursor.py:1189 - _init_result_and_meta() - DEBUG - Query result format: json
2025-05-19 16:11:57,916 - MainThread result_batch.py:486 - _parse() - DEBUG - parsing for result batch id: 1
2025-05-19 16:11:57,916 - MainThread cursor.py:1203 - _init_result_and_meta() - DEBUG - Number of results in first chunk: 1
2025-05-19 16:11:57,916 - MainThread connection.py:990 - cursor() - DEBUG - cursor
2025-05-19 16:11:57,916 - MainThread cursor.py:945 - execute() - DEBUG - executing SQL/command
2025-05-19 16:11:57,917 - MainThread cursor.py:964 - execute() - DEBUG - query: [select current_database(), current_schema();]
2025-05-19 16:11:57,917 - MainThread connection.py:1840 - _process_params_dict() - DEBUG - parameters: {}
2025-05-19 16:11:57,917 - MainThread cursor.py:797 - _preprocess_pyformat_query() - DEBUG - binding: [select current_database(), current_schema();] with input=[{}], processed=[{}]
2025-05-19 16:11:57,917 - MainThread connection.py:1886 - _next_sequence_counter() - DEBUG - sequence counter: 2
2025-05-19 16:11:57,917 - MainThread cursor.py:666 - _execute_helper() - DEBUG - Request id: f8f0cc76-1d77-4ae5-84ef-5b68c652c885
2025-05-19 16:11:57,917 - MainThread cursor.py:668 - _execute_helper() - DEBUG - running query [select current_database(), current_schema();]
2025-05-19 16:11:57,917 - MainThread cursor.py:675 - _execute_helper() - DEBUG - is_file_transfer: True
2025-05-19 16:11:57,917 - MainThread connection.py:1541 - cmd_query() - DEBUG - _cmd_query
2025-05-19 16:11:57,917 - MainThread _query_context_cache.py:152 - serialize_to_dict() - DEBUG - serialize_to_dict() called
2025-05-19 16:11:57,917 - MainThread _query_context_cache.py:273 - log_cache_entries() - DEBUG - Cache Entry: (0, 1747696317910936, 0)
2025-05-19 16:11:57,917 - MainThread _query_context_cache.py:177 - serialize_to_dict() - DEBUG - serialize_to_dict(): data to send to server {'entries': [{'id': 0, 'timestamp': 1747696317910936, 'priority': 0, 'context': {'base64Data': 'CKbN1IIw'}}]}
2025-05-19 16:11:57,917 - MainThread connection.py:1570 - cmd_query() - DEBUG - sql=[select current_database(), current_schema();], sequence_id=[2], is_file_transfer=[False]
2025-05-19 16:11:57,918 - MainThread network.py:504 - request() - DEBUG - Opentelemtry otel injection failed
Traceback (most recent call last):
File "/Users/bill/Temp/venv/lib/python3.11/site-packages/snowflake/connector/network.py", line 498, in request
from opentelemetry.trace.propagation.tracecontext import (
ModuleNotFoundError: No module named 'opentelemetry'
2025-05-19 16:11:57,918 - MainThread network.py:1232 - _use_requests_session() - DEBUG - Session status for SessionPool 'XXXXX.snowflakecomputing.com', SessionPool 1/1 active sessions
2025-05-19 16:11:57,918 - MainThread network.py:906 - _request_exec_wrapper() - DEBUG - remaining request timeout: N/A ms, retry cnt: 1
2025-05-19 16:11:57,919 - MainThread network.py:888 - add_request_guid() - DEBUG - Request guid: 1eb30d05-e1eb-4b1d-ad02-8c49ec59ddba
2025-05-19 16:11:57,919 - MainThread network.py:1078 - _request_exec() - DEBUG - socket timeout: 60
2025-05-19 16:11:58,069 - MainThread connectionpool.py:474 - _make_request() - DEBUG - https://XXXXX.snowflakecomputing.com:443 "POST /queries/v1/query-request?requestId=f8f0cc76-1d77-4ae5-84ef-5b68c652c885&request_guid=1eb30d05-e1eb-4b1d-ad02-8c49ec59ddba HTTP/1.1" 200 None
2025-05-19 16:11:58,071 - MainThread network.py:1105 - _request_exec() - DEBUG - SUCCESS
2025-05-19 16:11:58,071 - MainThread network.py:1237 - _use_requests_session() - DEBUG - Session status for SessionPool 'XXXXX.snowflakecomputing.com', SessionPool 0/1 active sessions
2025-05-19 16:11:58,071 - MainThread network.py:770 - _post_request() - DEBUG - ret[code] = None, after post request
2025-05-19 16:11:58,071 - MainThread network.py:796 - _post_request() - DEBUG - Query id: 01bc764f-0515-49e5-0010-f4032b2e368a
2025-05-19 16:11:58,071 - MainThread _query_context_cache.py:188 - deserialize_json_dict() - DEBUG - deserialize_json_dict() called: data from server: {'entries': [{'id': 0, 'timestamp': 1747696318069843, 'priority': 0, 'context': 'CJbP1IIw'}]}
2025-05-19 16:11:58,072 - MainThread _query_context_cache.py:273 - log_cache_entries() - DEBUG - Cache Entry: (0, 1747696317910936, 0)
2025-05-19 16:11:58,072 - MainThread _query_context_cache.py:229 - deserialize_json_dict() - DEBUG - deserialize {'id': 0, 'timestamp': 1747696318069843, 'priority': 0, 'context': 'CJbP1IIw'}
2025-05-19 16:11:58,072 - MainThread _query_context_cache.py:98 - _sync_priority_map() - DEBUG - sync_priority_map called priority_map size = 0, new_priority_map size = 1
2025-05-19 16:11:58,072 - MainThread _query_context_cache.py:124 - trim_cache() - DEBUG - trim_cache() called. treeSet size is 1 and cache capacity is 5
2025-05-19 16:11:58,072 - MainThread _query_context_cache.py:133 - trim_cache() - DEBUG - trim_cache() returns. treeSet size is 1 and cache capacity is 5
2025-05-19 16:11:58,072 - MainThread _query_context_cache.py:268 - deserialize_json_dict() - DEBUG - deserialize_json_dict() returns
2025-05-19 16:11:58,072 - MainThread _query_context_cache.py:273 - log_cache_entries() - DEBUG - Cache Entry: (0, 1747696318069843, 0)
2025-05-19 16:11:58,072 - MainThread cursor.py:1022 - execute() - DEBUG - sfqid: 01bc764f-0515-49e5-0010-f4032b2e368a
2025-05-19 16:11:58,072 - MainThread cursor.py:1028 - execute() - DEBUG - query execution done
2025-05-19 16:11:58,072 - MainThread cursor.py:1042 - execute() - DEBUG - SUCCESS
2025-05-19 16:11:58,072 - MainThread cursor.py:1061 - execute() - DEBUG - PUT OR GET: False
2025-05-19 16:11:58,072 - MainThread cursor.py:1189 - _init_result_and_meta() - DEBUG - Query result format: arrow
2025-05-19 16:11:58,073 - MainThread cursor.py:1203 - _init_result_and_meta() - DEBUG - Number of results in first chunk: 1
2025-05-19 16:11:58,073 - MainThread result_batch.py:65 - _create_nanoarrow_iterator() - DEBUG - Using nanoarrow as the arrow data converter
2025-05-19 16:11:58,074 - MainThread CArrowIterator.cpp:116 - CArrowIterator() - DEBUG - Arrow BatchSize: 1
2025-05-19 16:11:58,074 - MainThread CArrowChunkIterator.cpp:45 - CArrowChunkIterator() - DEBUG - Arrow chunk info: batchCount 1, columnCount 2, use_numpy: 0
2025-05-19 16:11:58,074 - MainThread nanoarrow_arrow_iterator.cpython-311-darwin.so:0 - __cinit__() - DEBUG - Batches read: 0
2025-05-19 16:11:58,074 - MainThread result_set.py:83 - result_set_iterator() - DEBUG - beginning to schedule result batch downloads
2025-05-19 16:11:58,074 - MainThread CArrowChunkIterator.cpp:69 - next() - DEBUG - Current batch index: 0, rows in current batch: 1
2025-05-19 16:11:58,074 - MainThread connection.py:990 - cursor() - DEBUG - cursor
2025-05-19 16:11:58,074 - MainThread cursor.py:945 - execute() - DEBUG - executing SQL/command
2025-05-19 16:11:58,074 - MainThread cursor.py:964 - execute() - DEBUG - query: [ROLLBACK]
2025-05-19 16:11:58,074 - MainThread cursor.py:797 - _preprocess_pyformat_query() - DEBUG - binding: [ROLLBACK] with input=[None], processed=[{}]
2025-05-19 16:11:58,074 - MainThread connection.py:1886 - _next_sequence_counter() - DEBUG - sequence counter: 3
2025-05-19 16:11:58,074 - MainThread cursor.py:666 - _execute_helper() - DEBUG - Request id: d75438f1-a113-4784-a06b-967dbe68ffb8
2025-05-19 16:11:58,075 - MainThread cursor.py:668 - _execute_helper() - DEBUG - running query [ROLLBACK]
2025-05-19 16:11:58,075 - MainThread cursor.py:675 - _execute_helper() - DEBUG - is_file_transfer: True
2025-05-19 16:11:58,075 - MainThread connection.py:1541 - cmd_query() - DEBUG - _cmd_query
2025-05-19 16:11:58,075 - MainThread _query_context_cache.py:152 - serialize_to_dict() - DEBUG - serialize_to_dict() called
2025-05-19 16:11:58,075 - MainThread _query_context_cache.py:273 - log_cache_entries() - DEBUG - Cache Entry: (0, 1747696318069843, 0)
2025-05-19 16:11:58,075 - MainThread _query_context_cache.py:177 - serialize_to_dict() - DEBUG - serialize_to_dict(): data to send to server {'entries': [{'id': 0, 'timestamp': 1747696318069843, 'priority': 0, 'context': {'base64Data': 'CJbP1IIw'}}]}
2025-05-19 16:11:58,075 - MainThread connection.py:1570 - cmd_query() - DEBUG - sql=[ROLLBACK], sequence_id=[3], is_file_transfer=[False]
2025-05-19 16:11:58,076 - MainThread network.py:504 - request() - DEBUG - Opentelemtry otel injection failed
Traceback (most recent call last):
File "/Users/bill/Temp/venv/lib/python3.11/site-packages/snowflake/connector/network.py", line 498, in request
from opentelemetry.trace.propagation.tracecontext import (
ModuleNotFoundError: No module named 'opentelemetry'
2025-05-19 16:11:58,076 - MainThread network.py:1232 - _use_requests_session() - DEBUG - Session status for SessionPool 'XXXXX.snowflakecomputing.com', SessionPool 1/1 active sessions
2025-05-19 16:11:58,076 - MainThread network.py:906 - _request_exec_wrapper() - DEBUG - remaining request timeout: N/A ms, retry cnt: 1
2025-05-19 16:11:58,076 - MainThread network.py:888 - add_request_guid() - DEBUG - Request guid: 88b2d48a-fb5a-4326-bd6c-b90915abd2a7
2025-05-19 16:11:58,076 - MainThread network.py:1078 - _request_exec() - DEBUG - socket timeout: 60
2025-05-19 16:11:58,206 - MainThread connectionpool.py:474 - _make_request() - DEBUG - https://XXXXX.snowflakecomputing.com:443 "POST /queries/v1/query-request?requestId=d75438f1-a113-4784-a06b-967dbe68ffb8&request_guid=88b2d48a-fb5a-4326-bd6c-b90915abd2a7 HTTP/1.1" 200 None
2025-05-19 16:11:58,207 - MainThread network.py:1105 - _request_exec() - DEBUG - SUCCESS
2025-05-19 16:11:58,208 - MainThread network.py:1237 - _use_requests_session() - DEBUG - Session status for SessionPool 'XXXXX.snowflakecomputing.com', SessionPool 0/1 active sessions
2025-05-19 16:11:58,208 - MainThread network.py:770 - _post_request() - DEBUG - ret[code] = None, after post request
2025-05-19 16:11:58,208 - MainThread network.py:796 - _post_request() - DEBUG - Query id: 01bc764f-0515-49b8-0010-f4032b2e54b6
2025-05-19 16:11:58,208 - MainThread _query_context_cache.py:188 - deserialize_json_dict() - DEBUG - deserialize_json_dict() called: data from server: {'entries': [{'id': 0, 'timestamp': 1747696318208066, 'priority': 0, 'context': 'COLN1IIw'}]}
2025-05-19 16:11:58,208 - MainThread _query_context_cache.py:273 - log_cache_entries() - DEBUG - Cache Entry: (0, 1747696318069843, 0)
2025-05-19 16:11:58,208 - MainThread _query_context_cache.py:229 - deserialize_json_dict() - DEBUG - deserialize {'id': 0, 'timestamp': 1747696318208066, 'priority': 0, 'context': 'COLN1IIw'}
2025-05-19 16:11:58,208 - MainThread _query_context_cache.py:98 - _sync_priority_map() - DEBUG - sync_priority_map called priority_map size = 0, new_priority_map size = 1
2025-05-19 16:11:58,208 - MainThread _query_context_cache.py:124 - trim_cache() - DEBUG - trim_cache() called. treeSet size is 1 and cache capacity is 5
2025-05-19 16:11:58,209 - MainThread _query_context_cache.py:133 - trim_cache() - DEBUG - trim_cache() returns. treeSet size is 1 and cache capacity is 5
2025-05-19 16:11:58,209 - MainThread _query_context_cache.py:268 - deserialize_json_dict() - DEBUG - deserialize_json_dict() returns
2025-05-19 16:11:58,209 - MainThread _query_context_cache.py:273 - log_cache_entries() - DEBUG - Cache Entry: (0, 1747696318208066, 0)
2025-05-19 16:11:58,209 - MainThread cursor.py:1022 - execute() - DEBUG - sfqid: 01bc764f-0515-49b8-0010-f4032b2e54b6
2025-05-19 16:11:58,209 - MainThread cursor.py:1028 - execute() - DEBUG - query execution done
2025-05-19 16:11:58,209 - MainThread cursor.py:1042 - execute() - DEBUG - SUCCESS
2025-05-19 16:11:58,209 - MainThread cursor.py:1061 - execute() - DEBUG - PUT OR GET: False
2025-05-19 16:11:58,209 - MainThread cursor.py:1189 - _init_result_and_meta() - DEBUG - Query result format: json
2025-05-19 16:11:58,209 - MainThread result_batch.py:486 - _parse() - DEBUG - parsing for result batch id: 1
2025-05-19 16:11:58,210 - MainThread cursor.py:1203 - _init_result_and_meta() - DEBUG - Number of results in first chunk: 1