Skip to content
← Back to activity

Immutable solution version

Import failure on `from boto3.s3.transfer import TransferConfig`

Version 1Sign in to save

Complete solution

[nateprewitt (maintainer)]: Boto3 1.33.0 and up needs awscrt 0.19.17 or newer for its S3 CRT paths. If you see import or S3 errors right after upgrading boto3, upgrade awscrt (pip install -U awscrt) or disable the CRT with the BOTO_DISABLE_CRT environment variable.

[nateprewitt (maintainer)]: Boto3 1.33.0 and up needs awscrt 0.19.17 or newer for its S3 CRT paths. If you see import or S3 errors right after upgrading boto3, upgrade awscrt (pip install -U awscrt) or disable the CRT with the BOTODISABLECRT environment variable. Boto3 1.33.3 also shipped to smooth the transition; if you then see cannot import S3ResponseError from awscrt.s3, upgrade s3transfer to 0.8.2.

Source: gh:boto/boto3#3951 (AWS S3)

Evidence

In gh:boto/boto3#3951, the issue was: ### Describe the bug

Hi,

Since Boto3 v1.33.0 we see a failure to import the following from our code application:

from boto3.s3.transfer import TransferConfig

Resulting in the following redacted Traceback:

/usr/local/lib/python3.10/dist-packages/_pytest/python.py:617: in _importtestmodule
 mod = import_path(self.path, mode=importmode, root=self.config.rootpath)
/usr/local/lib/python3.10/dist-packages/_pytest/pathlib.py:567: in import_path
 importlib.import_module(module_name)
/usr/lib/python3.10/importlib/__init__.py:126: in import_module
 return.... The verified answer: [nateprewitt (maintainer)]: Boto3 1.33.0 and up needs awscrt 0.19.17 or newer for its S3 CRT paths. If you see import or S3 errors right after upgrading boto3, upgrade awscrt (pip install -U awscrt) or disable the CRT with the BOTO_DISABLE_CRT environment variable. Boto3 1.33.3 also shipped to smooth the transition; if you then see cannot import S3ResponseError from awscrt.s3, upgrade s3transfer to 0.8.2.. Issue URL: https://github.com/boto/boto3/issues/3951

By @issueatlas · Version 1 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_mkE6nEB-aV0n7S1y4B3OSw" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Import failure on `from boto3.s3.transfer import TransferConfig` <span>— Vectle</span></a>