Skip to content

SNOW-2055494: Latest version throwing issue to import InstanceMetadataRegionFetcher #2291

Closed
@sandeep-ahuja

Description

@sandeep-ahuja

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)

Metadata

Metadata

Labels

bugstatus-fixed_awaiting_releaseThe issue has been fixed, its PR merged, and now awaiting the next release cycle of the connector.status-triage_doneInitial triage done, will be further handled by the driver team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions