Smartsheet pyinstaller Not Allowing Connection to API

南楼画角 提交于 2020-08-26 13:36:45

问题


I'm new to pyinstaller and trying to package a script I wrote that connects to Smartsheet. The code runs fine in PyCharm, but when I go to run the executable that it outputs the client object is just treated as a string and won't let me access any attributes.

ImportError! Could not load api or model class Users
Traceback (most recent call last):
 File "filename.py", line XX, in <module>
AttributeError: 'str' object has no attribute 'get_current_user'
[1480] Failed to execute script filename

PyInstaller: 3.4 Python: 3.6.5 Windows: 7

Update:

It looks like smartsheet is trying to import the requests.packages.urllib3 library but this is failing. I've tride adding the directory to this file using:

pyi-makespec --paths=directory\requests\packages.py myapp.py pyi-makespec --paths=directory\smartsheet\smartsheet.py myapp.py

but it's still failing.

来源:https://stackoverflow.com/questions/52562106/smartsheet-pyinstaller-not-allowing-connection-to-api

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!