Operators such as setting the object mode failed after calling WM_OT_open_mainfile from Python. Keep the window after loading a file outside the main event loop.
Operators such as setting the object mode failed after calling WM_OT_open_mainfile from Python. Keep the window after loading a file outside the main event loop.