Home > Software design >  pyinstaller executable has errors but is completely fine when opening .py file on terminal
pyinstaller executable has errors but is completely fine when opening .py file on terminal

Time:04-27

I'm trying to make an executable file for a project so my friends don't need to install python, using pyinstaller

When using pyinstaller with "-w"
The executable shows an Attribute error

Traceback (most recent call last):
  File "main.py", line 7, in <module>
    display = calendar_object.make_calendar()
AttributeError: 'Calendar' object has no attribute 'make_calendar'

but when I open main.py in the terminal it is completely fine.

When using pyinstaller without "-w"
It opens and closes immediately, and yes I have a while loop and an input inside so I'm guessing there's again, something wrong with my file

Temporary Solution:
Inserting all the separate files into one file.

Code Sample:
main.py
calendar.py

CodePudding user response:

You seem to be using a name for your class that is mimicking the python internal calendar class.

Rename your class and you should be fine

  • Related