3

Banging my head against the wall here, first time using an sdk. I keep receiving a 'NoneType' object is not callable error when trying to authenticate with jwt via the Box Python SDK

I've pretty much followed all the recommendations from the dev forum posts on Box. Signs point to not having "boxsdk[jwt]" installed being the issue. I've uninstalled and reinstalled the sdk, generated a new public / private key set, and started from scratch. I can't help but feel I'm missing something simple here.

from boxsdk import JWTAuth

auth = JWTAuth(
               client_id='clientid',
               client_secret='secret',
               enterprise_id='eid',
               jwt_key_id='key',
               rsa_private_key_file_sys_path='./Desktop/certy.pem',
               rsa_private_key_passphrase='passphrase'
               )

access_token = auth.authenticate_instance()

from boxsdk import Client

client = Client(auth)

I expect this should successfully but I receive the following:

Traceback (most recent call last):
  File "python.py", line 9, in <module>
    rsa_private_key_passphrase=******
TypeError: 'NoneType' object is not callable
grimes88
  • 51
  • 2
  • 8

2 Answers2

2

I had the same issue and it turned out it was that I needed to:

pip install "boxsdk[jwt]"

See here

mitsos
  • 23
  • 7
0

Had similar error and found that PyJWT module was not installed. after installing it issue was resolved for me.