Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JwtPayload TypeError: __init__() got an unexpected keyword argument 'aud' #181

Closed
EllieTheYeen opened this issue Nov 6, 2023 · 3 comments · Fixed by #182
Closed

JwtPayload TypeError: __init__() got an unexpected keyword argument 'aud' #181

EllieTheYeen opened this issue Nov 6, 2023 · 3 comments · Fixed by #182

Comments

@EllieTheYeen
Copy link

Now recently there has started to appear the following issue

Traceback (most recent call last):
  File "/home/pi/bots/posters/crossposter/blueskypost.py", line 80, in <module>
    client._set_session(ses)
  File "/home/pi/.local/lib/python3.9/site-packages/atproto/xrpc_client/client/methods_mixin/session.py", line 68, in _set_session
    self._refresh_jwt_payload = get_jwt_payload(session.refresh_jwt)
  File "/home/pi/.local/lib/python3.9/site-packages/atproto/xrpc_client/client/auth.py", line 18, in get_jwt_payload
    return JwtPayload(**plain_payload)
TypeError: __init__() got an unexpected keyword argument 'aud'
Traceback (most recent call last):
  File "/home/pi/bots/posters/crossposter/blueskypost.py", line 80, in <module>
    client._set_session(ses)
  File "/home/pi/.local/lib/python3.9/site-packages/atproto/xrpc_client/client/methods_mixin/session.py", line 68, in _set_session
    self._refresh_jwt_payload = get_jwt_payload(session.refresh_jwt)
  File "/home/pi/.local/lib/python3.9/site-packages/atproto/xrpc_client/client/auth.py", line 18, in get_jwt_payload
    return JwtPayload(**plain_payload)
TypeError: __init__() got an unexpected keyword argument 'aud'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/home/pi/bots/posters/crossposter/blueskypost.py", line 88, in <module>
    client.login(username, password)
  File "/home/pi/.local/lib/python3.9/site-packages/atproto/xrpc_client/client/client.py", line 74, in login
  File "/home/pi/.local/lib/python3.9/site-packages/atproto/xrpc_client/client/client.py", line 40, in _get_and_set_session
    session = self._get_and_set_session(login, password)
    self._set_session(session)
  File "/home/pi/.local/lib/python3.9/site-packages/atproto/xrpc_client/client/methods_mixin/session.py", line 68, in _set_session
    self._refresh_jwt_payload = get_jwt_payload(session.refresh_jwt)
  File "/home/pi/.local/lib/python3.9/site-packages/atproto/xrpc_client/client/auth.py", line 18, in get_jwt_payload
    return JwtPayload(**plain_payload)
TypeError: __init__() got an unexpected keyword argument 'aud'

I think it has to do something with the JwtPayload

@fvillemin
Copy link

I confirm the issue, the auth doesn't work anymore :(

@MarshalX
Copy link
Owner

MarshalX commented Nov 6, 2023

fix version will be released soon

@MarshalX
Copy link
Owner

MarshalX commented Nov 6, 2023

fix version is 0.0.30 pls update using pip install -U atproto

emilyhunt added a commit to bluesky-astronomy/astrofeed-lib that referenced this issue Nov 6, 2023
Fixes issues in xrpc clients associated with MarshalX/atproto#181
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants