{"action":"created","issue":{"url":"https://api.github.com/repos/box/box-python-sdk/issues/148","repository_url":"https://api.github.com/repos/box/box-python-sdk","labels_url":"https://api.github.com/repos/box/box-python-sdk/issues/148/labels{/name}","comments_url":"https://api.github.com/repos/box/box-python-sdk/issues/148/comments","events_url":"https://api.github.com/repos/box/box-python-sdk/issues/148/events","html_url":"https://github.com/box/box-python-sdk/issues/148","id":164227819,"number":148,"title":"\"'NoneType' object is not callable\" when running on Lambda","user":{"login":"alanwill","id":1929792,"avatar_url":"https://avatars.githubusercontent.com/u/1929792?v=3","gravatar_id":"","url":"https://api.github.com/users/alanwill","html_url":"https://github.com/alanwill","followers_url":"https://api.github.com/users/alanwill/followers","following_url":"https://api.github.com/users/alanwill/following{/other_user}","gists_url":"https://api.github.com/users/alanwill/gists{/gist_id}","starred_url":"https://api.github.com/users/alanwill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alanwill/subscriptions","organizations_url":"https://api.github.com/users/alanwill/orgs","repos_url":"https://api.github.com/users/alanwill/repos","events_url":"https://api.github.com/users/alanwill/events{/privacy}","received_events_url":"https://api.github.com/users/alanwill/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-07-07T04:34:30Z","updated_at":"2016-10-15T14:50:07Z","closed_at":"2016-07-07T05:22:46Z","body":"I'm trying to get this to successfully run in an AWS Lambda function and keep getting the error:\r\n\r\n```\r\nTraceback (most recent call last):\r\n  File \"handler.py\", line 27, in <module>\r\n    rsa_private_key_passphrase = boxPrivateKeyPassphrase\r\nTypeError: 'NoneType' object is not callable\r\n```\r\n\r\nThe area where it's failing is:\r\n\r\n```\r\n    enterpriseAuth = JWTAuth(\r\n        client_id=boxClientId,\r\n        client_secret=boxClientSecret,\r\n        enterprise_id=boxEnterpriseId,\r\n        jwt_key_id=boxJwtKeyId,\r\n        rsa_private_key_file_sys_path=boxPrivateKeyPath,\r\n        rsa_private_key_passphrase=boxPrivateKeyPassphrase\r\n    )\r\n```\r\n\r\nI could duplicate it on an EC2 instance with modules packaged with the script in a vendored directory. \r\n\r\n```\r\n.\r\n├── boxsdk\r\n│   ├── auth\r\n│   ├── client\r\n│   ├── network\r\n│   ├── object\r\n│   ├── session\r\n│   └── util\r\n├── boxsdk-1.5.3.dist-info\r\n├── enum\r\n├── enum34-1.1.6.dist-info\r\n├── idna\r\n├── idna-2.1.dist-info\r\n├── ipaddress-1.0.16.dist-info\r\n├── jwt\r\n│   └── contrib\r\n├── pkg_resources\r\n│   ├── extern\r\n│   └── _vendor\r\n├── pyasn1\r\n│   ├── codec\r\n│   ├── compat\r\n│   └── type\r\n├── pyasn1-0.1.9.dist-info\r\n├── pycparser\r\n│   └── ply\r\n├── pycparser-2.14.egg-info\r\n├── PyJWT-1.4.0.dist-info\r\n├── requests\r\n│   └── packages\r\n├── requests-2.10.0.dist-info\r\n├── requests_toolbelt\r\n│   ├── adapters\r\n│   ├── auth\r\n│   ├── cookies\r\n│   ├── downloadutils\r\n│   ├── multipart\r\n│   ├── threaded\r\n│   └── utils\r\n├── requests_toolbelt-0.6.2.dist-info\r\n├── setuptools\r\n│   ├── command\r\n│   └── extern\r\n├── setuptools-24.0.2.dist-info\r\n└── six-1.10.0.dist-info\r\n```\r\n\r\nThe only way to get it to work on EC2 is by `sudo pip install boxsdk[jwt]` on the system packages after installing a number of dependencies like libffi-devel, gcc and openssl-devel. \r\n\r\nSo does anyone know what's missing that I could bundle with the function into Lambda in order to get this working?\r\n"},"comment":{"url":"https://api.github.com/repos/box/box-python-sdk/issues/comments/253988726","html_url":"https://github.com/box/box-python-sdk/issues/148#issuecomment-253988726","issue_url":"https://api.github.com/repos/box/box-python-sdk/issues/148","id":253988726,"user":{"login":"dynamatic","id":5526167,"avatar_url":"https://avatars.githubusercontent.com/u/5526167?v=3","gravatar_id":"","url":"https://api.github.com/users/dynamatic","html_url":"https://github.com/dynamatic","followers_url":"https://api.github.com/users/dynamatic/followers","following_url":"https://api.github.com/users/dynamatic/following{/other_user}","gists_url":"https://api.github.com/users/dynamatic/gists{/gist_id}","starred_url":"https://api.github.com/users/dynamatic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dynamatic/subscriptions","organizations_url":"https://api.github.com/users/dynamatic/orgs","repos_url":"https://api.github.com/users/dynamatic/repos","events_url":"https://api.github.com/users/dynamatic/events{/privacy}","received_events_url":"https://api.github.com/users/dynamatic/received_events","type":"User","site_admin":false},"created_at":"2016-10-15T14:50:07Z","updated_at":"2016-10-15T14:50:07Z","body":"Hi Alan,\r\n\r\nI am running into the same issue, the only difference is I am getting this error on my mac. Could you please elaborate how you have resolved the issue?"}}
{"actor":{"display_login":"dynamatic"}}