Skip to content

Fix aws-login unexpected keyword argument error#259

Merged
ddriddle merged 2 commits intomasterfrom
fix/257
Dec 18, 2025
Merged

Fix aws-login unexpected keyword argument error#259
ddriddle merged 2 commits intomasterfrom
fix/257

Conversation

@zdc217
Copy link
Contributor

@zdc217 zdc217 commented Nov 20, 2025

Closes #257

@ddriddle ddriddle self-assigned this Nov 21, 2025
@ddriddle ddriddle force-pushed the fix/257 branch 5 times, most recently from c7ee235 to 7e6d3cf Compare November 21, 2025 19:03
@ddriddle
Copy link
Collaborator

commit 7e6d3cf contains the actual fix. Everything else is test code or changes to make the code unit testable:

commit 7e6d3cf98587fa09f45cff8f4861afaa270d1a04 (HEAD -> fix/257, upstream/fix/257)
Author: Zach Carrington <zdc@illinois.edu>
Date:   Thu Nov 20 16:02:04 2025 -0600

    Fix aws-login unexpected keyword argument error
    
    Closes #257

diff --git a/src/awscli_login/credentials.py b/src/awscli_login/credentials.py
index 39ef7cd..420ce8a 100644
--- a/src/awscli_login/credentials.py
+++ b/src/awscli_login/credentials.py
@@ -11,7 +11,7 @@ from datetime import datetime
 
 from botocore.session import Session
 
-from .__main__ import main as login, logout
+from .__main__ import main as aws_login, login, logout
 from ._version import version
 from .account_names import edit_account_names
 from .config import Profile, error_handler
@@ -121,7 +121,7 @@ def main():
         if ns.debug_info:
             debug_info()
             return
-        return login(ns, session)
+        return aws_login(ns, session)
     elif args.logout:
         return logout(Namespace(**json.load(args.logout)), session)
     elif args.alias:

@ddriddle ddriddle requested review from ddriddle, edthedev, mpitcel and tzturner and removed request for ddriddle November 21, 2025 21:53
@ddriddle ddriddle marked this pull request as ready for review November 21, 2025 21:53
@ddriddle
Copy link
Collaborator

I am able to reproduce the error without the fix above:

(venv) $ pip install .
(venv) $ aws login --duration 900
(venv) $ date
Fri Nov 21 14:24:05 CST 2025
(venv) $  aws s3 ls

Error when retrieving credentials from custom-process: main() got an unexpected keyword argument 'interactive'

(venv) $ aws-login 
main() got an unexpected keyword argument 'interactive'
$ date
Fri Nov 21 15:47:38 CST 2025

After applying the fix the error goes away:

(venv) $ aws login --duration 900
(venv) $ date
Fri Nov 21 15:50:31 CST 2025
(venv) $ aws s3 ls
(venv) $ date
Fri Nov 21 16:58:22 CST 2025
(venv) $ aws-login
{"AccessKeyId": "FAKE_ID", "SecretAccessKey": "FAKE_SECRET", "SessionToken": 
"FAKE_TOKEN", "Expiration": "2025-11-21T23:57:46+00:00", "Version": 1}

@edthedev
Copy link
Contributor

edthedev commented Dec 12, 2025

The test failures here are due to #261, and should clear up after we resolve that.

(Adding blocked label while we work #261.)

@edthedev edthedev added the blocked This issue is blocked by other work that needs to happen first. label Dec 12, 2025
@ddriddle ddriddle merged commit d7d3225 into master Dec 18, 2025
47 checks passed
@ddriddle ddriddle deleted the fix/257 branch December 18, 2025 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

blocked This issue is blocked by other work that needs to happen first.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Decorator Changes Function Signature Causing Unexpected Keyword Argument Error

4 participants