AttributeError: 'NoneType' object has no attribute 'from_settings_dictionary'

62 views Asked by At
from boxsdk import JWTAuth, Client
auth = JWTAuth.from_settings_file(settings_file_sys_path=box_config_json_path)
client = Client(auth)
print(client.user().get())
return client

Error in Lambda: 'NoneType' object has no attribute 'from_settings_file'

Tried installing boxsdk[jwt] instead of just boxsdk.

Added boxsdk[jwt] in requirement.txt or pip install "boxsdk[jwt]" (Because of '[' used quotes)

1

There are 1 answers

0
harinim On

Use

from boxsdk.auth.jwt_auth import JWTAuth

Instead of

from boxsdk import JWTAuth

This resolved issue in lambda.

pip install boxsdk[jwt]

only resolved the issue in my local and not in my lambda.