question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Pyjwt 2.0.0 compatibility issue

See original GitHub issue

graphql.error.located_error.GraphQLLocatedError: module 'jwt' has no attribute 'ExpiredSignature'

ExpiredSignature is deprecated and ExpiredSignatureError should be used instead in the newer Pyjwt versions.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:15
  • Comments:13 (1 by maintainers)

github_iconTop GitHub Comments

7reactions
laurent-brisboiscommented, Dec 25, 2020

I’ve had issues with PyJWT 2.0.0 too. I had to downgrade to 1.7.1 where it was working. My error was :

in jwt_encode
    jwt_settings.JWT_ALGORITHM,
graphql.error.located_error.GraphQLLocatedError: 'str' object has no attribute 'decode'
3reactions
rganeyevcommented, Jan 27, 2021

@IbrahimAlgadi well, it is bad architecture desicion. What may happen when pyJWT changes signature on their major update? I see here multiple solutions:

  1. [Easy] Restrict PyJWT version as 1.*. It is hot fix, and will work. #244 for that.
  2. [Right] Increase PyJWT version to 2.* and fix all jwt-related issues. That includes your change, and all possible jwt usages in the repo.
  3. [I did this] Abandon this repo as it is dead and no-one is going to maintain it.
Read more comments on GitHub >

github_iconTop Results From Across the Web

Changelog — PyJWT 2.0.1 documentation
Fixed¶. Fix from_jwk() for all algorithms #598 ... Improve typings¶. We no longer need to use mypy Python 2 compatibility mode (comments) ...
Read more >
How to fix compatibility between libraries - Stack Overflow
I'm working with Django-rest-jwt, which requires PyJWT and jwt. The problem is - I made fork to PyJWT cause I need some code...
Read more >
Update pyjwt version to >=2.0.0,<3.0.0 · e155fa9383 - OpenDev
Pyjwt recently made a 2.0 release. This release is not compatible with the 1.x series code. We fix the registry to be compat...
Read more >
PyJWT - PyPI
Installing. Install with pip: $ pip install PyJWT. Usage. >>> import jwt >>> encoded = jwt.encode({"some": "payload"}, "secret", algorithm="HS256") ...
Read more >
pyjwt Changelog - pyup.io
Improve PyJWKSet error accuracy by JulianMaurin in `786 ... 2.0.0. Not secure ... We no longer need to use mypy Python 2 compatibility...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found