azure-sdk-for-python: jwt.exceptions.DecodeError: It is required that you pass in a value for the "algorithms" argument when calling decode()

  • Package Name: azureml-core
  • Package Version: 1.18.0.post1
  • Operating System: vs2017-win2016
  • Python Version: 3.6.8

Describe the bug Launching the build of a ML pipeline I get the following error before it’s able to start the first step:

It is required that you pass in a value for the "algorithms" argument when calling decode().'
jwt.exceptions.DecodeError: It is required that you pass in a value for the "algorithms" argument when calling decode()

To Reproduce Steps to reproduce the behavior: 1.

Expected behavior That the pipeline starts without problem.

Additional context PyJWT is pinned to version 1.7.1 On a different Azure Machine Learning the pipelines run without issues.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 6
  • Comments: 24 (9 by maintainers)

Commits related to this issue

Most upvoted comments

i got the same issues so if some one still get hte same issues try this

token = jwt.encode({'user_id':user_id,'exp':datetime.datetime.utcnow()+datetime.timedelta(minutes=1440)},SECRET, algorithm="HS256")
    data = jwt.decode(token,SECRET,algorithms="HS256")

you have to passe the alogrithms

I am also getting the same error and it is working fine in another subscription. Any update on this issue?

Here’s a NOTE: ( I made this silly mistake 😦 Hope this helps someone ) you have to pass a value as ’ algorithm ’ in jwt.encode( ) and not ’ algorithms ’ but you have to pass value as ’ algorithms ’ in jwt.decode( ) and not ’ algorithm ’

When facing this error, I kept my azure-core at 1.9.0 and downgraded PyJWT to 1.7.1 (from 2.0.1) and it worked.

Hi @00Kai0, I confirm you that I had PyJWT==1.7.1. with azureml-core==1.18.0.post1. Using azureml-core==1.20.0, keeping PyJWT==1.7.1, solves the issue.

@Thalinda, thank you man

closing since this issue is resolved

@gison93 sorry about that. Just updated the link with the proper TSG. Glad to hear you are unblocked

Hi @needuv, updating azureml-core to version 1.20.0 solves the issue. Clicking on the TSG link returns 401 error.

this seems to be a package that’s outside our team’s domain knowledge. @00Kai0 @jsntcy do you guys have knowledge about this?