Giter VIP home page Giter VIP logo

adobetarget's People

Contributors

derring-do avatar

Stargazers

 avatar

Watchers

 avatar  avatar

adobetarget's Issues

No module named 'jwt'

devtools::install_github("derring-do/adobeTarget", force=TRUE)
library(adobeTaRget)
exchangeJWTforBearerToken()

Error in py_run_file_impl(file, local, convert) :
ModuleNotFoundError: No module named 'jwt'

Error 'str' object has no attribute 'decode' from exchangeJWTforBearerToken

I get this error when I try to run exchangeJWTforBearerToken:

 Error in py_call_impl(callable, dots$args, dots$keywords) : 
  AttributeError: 'str' object has no attribute 'decode' 

I traced this back to the version of pyJWT I'm using (2.0.1) - I don't get this error if I downgrade to version 1.7.1 of that package. However, that's not possible for me because pyjwt 1.7.1 isn't compatible with the version of python I'm using.

It looks like if we remove line 69 (the jwt.decode line below) of ExchangeJWT.py, I can run the file and retrieve the Bearer Token successfully:

    # create JSON Web Token, signing it with the private key.
    jwt_token = jwt.encode(payload, priv_key, algorithm='RS256')
        
    # decode bytes into string
    #jwt_token = jwt.decode(jwt_token, priv_key, algorithms=['RS256'])

Would it work to have this package require pyJWT 2.0.0 or higher (jpadilla/pyjwt#587) and make that change to ExchangeJWT.py?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.