Credentials.__new__() takes 5 positional arguments but 6 were given
- I installed
aws-export-credentialswithpipx which aws-export-credentials->/Users/philipp/.local/bin/aws-export-credentials
If I start aws-export-credentials without any params I get error
Credentials.__new__() takes 5 positional arguments but 6 were given
Any advice?
+1 Seeing this as well
This tool is no longer maintained, because there's native support for it in the AWS CLI: https://awscli.amazonaws.com/v2/documentation/api/latest/reference/configure/export-credentials.html That said, I'll take a look at what changed in botocore
What's the output when you run with --debug?
@benkehoe I did not debug it yet just saw this error today also
DEBUG:botocore.credentials:Retrieved credentials will expire at: 2025-04-15 19:43:30+00:00
Traceback (most recent call last):
File "~/.local/share/mise/installs/python/3.13.2/lib/python3.13/site-packages/aws_export_credentials/aws_export_credentials.py", line 191, in main
credentials = get_credentials(session, ensure_temporary=args.ensure_temporary)
File "~/.local/share/mise/installs/python/3.13.2/lib/python3.13/site-packages/aws_export_credentials/aws_export_credentials.py", line 103, in get_credentials
credentials = convert_creds(read_only_credentials, expiration)
File "~/.local/share/mise/installs/python/3.13.2/lib/python3.13/site-packages/aws_export_credentials/aws_export_credentials.py", line 50, in convert_creds
return Credentials(*list(read_only_creds) + [expiration])
created PR to Fix it
https://github.com/benkehoe/aws-export-credentials/pull/20
+1
Was facing this issue, made a temporary fix by downgrading boto3 for aws-export-credentials
pipx inject aws-export-credentials boto3==1.28.57
@pranav-md u can use 1.36.26
while export-credentials.html has been introduced to aws cli, it doesn't support export to a credentials file (AWS_SHARED_CREDENTIALS_FILE)
Full command to run nowadays (with ux): uvx --with "boto3==1.36.26" aws-export-credentials