Error in exe file
-
When I run my program exe file, I encounter this error, while in Qt Creator the program runs correctly.
Traceback (most recent call last):
File "main.py", line 338, in <module>
IndexError: list index out of rangeline338: root_object = engine.rootObjects()[0]
-
@Mahdi_2020 said in Error in exe file:
line338: root_object = engine.rootObjects()[0]
Who should know what this code does?
Please provide more details/code... -
@Mahdi_2020 said in Error in exe file:
IndexError: list index out of range
line338: root_object = engine.rootObjects()[0]
engine.rootObjects()
is not an array or, more likely, is an empty array so[0]
is out of range.
If it works under Creator but not outside then presumably creating the engine/objects fails outside because something is not set up right in the environment.When I run my program exe file
When using Python you do not have an executable file, just a bunch of
.py
file scripts.