Closed
Description
Python version
3.14.1
Operating system and processor architecture
AWS_DatabricksJob
Installed packages
pip install snowflake-connector-python
What did you do?
ImportError: cannot import name 'InstanceMetadataRegionFetcher' from 'botocore.utils' (/local_disk0/.ephemeral_nfs/cluster_libraries/python/lib/python3.11/site-packages/botocore/utils.py)
Workload failed, see run output for details
from ..wif_util import (
AttestationProvider,
WorkloadIdentityAttestation,
create_attestation,
)
Received error at this line in source code:
https://github.com/snowflakedb/snowflake-connector-python/blob/main/src/snowflake/connector/wif_util.py#L14
To fix this, just gave specific previous version and it worked fine.
pip install snowflake-connector-python==3.14.0
What did you expect to see?
The import should happen as expected without any errors.
The newer version be backward compatible.
Can you set logging to DEBUG and collect the logs?
import logging
import os
for logger_name in ('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)