0

I created an application and bundled it to exe by pyinstaller, however after I tested the exe application, it responded an error message. It seems like my essential api module wasn't imported properly. Please advise, thanks!

ImportError! Could not load api or model class Sheets
Exception in Tkinter callback
Traceback (most recent call last):
  File "tkinter\__init__.py", line 1883, in __call__
  File "D:\Python Projects\Concept Number Generator\Concept Number Generator.py", line 12, in concept_num
    my_sheet=smartsheet_client.Sheets.get_sheet(8743006875477892)
AttributeError: 'str' object has no attribute 'get_sheet'
zidinho
  • 33
  • 4
  • Does the information under the heading **EDIT 2** in this other question help you? -> https://stackoverflow.com/questions/39001131/including-smartsheet-sdk-in-a-bundled-app-via-pyinstaller i.e., in your case, try importing `smartsheet.Sheets` – Kim Brandl Apr 14 '20 at 17:14
  • Thank you Kim! It works. – zidinho Apr 14 '20 at 18:42
  • Excellent! Glad I could help. I've added this info as an answer below, to make it more discoverable by others in the future. Can you please mark the answer as accepted? – Kim Brandl Apr 14 '20 at 18:46

1 Answers1

1

Based on a search here in Stack Overflow, looks like others have run into this issue in the past. Try importing smartsheet.Sheets -- as described under the heading EDIT 2 in this question: including smartsheet sdk in a bundled app via pyinstaller.

Kim Brandl
  • 13,125
  • 2
  • 16
  • 21