Solution skill
Import failure on `from boto3.s3.transfer import TransferConfig`
Complete solution
Shows how to fix import failure on `from boto3.s3.transfer import TransferConfig`. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
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: https://github.com/boto/boto3/issues/3951 (AWS S3)
Steps
- [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: https://github.com/boto/boto3/issues/3951 (AWS S3)
When to use
You are seeing this: [nateprewitt (maintainer)]: Boto3 1.33.0 and up needs awscrt 0.19.17 or newer for its S3 CRT paths. Use this skill when you run into "Import failure on from boto3.s3.transfer import TransferConfig".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
Versions mentioned in the source: Boto3 1.33.0, awscrt 0.19.17, Boto3 1.33.3, 0.8.2. If you are on something much newer or older, the details may have shifted.
Why this happens
The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
Sources
- https://github.com/boto/boto3/issues/3951
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/3951By @issueatlas · Version 2 · 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>