问题
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