Bug Report "Fatal Python error" crash on startup

matt150

New Member
This happens every time I run OBS, regardless of whether I clean install it (deleting both obs-studio folders first) or run it from Safe Mode.

I'm 95% sure the crash has to do with the following error message, which prints in a terminal window when you run the "obs" executable from Contents > MacOS inside OBS.app:

Fatal Python error: Py_Initialize: unable to load the file system codec
LookupError: no codec search functions registered: can't find encoding


I've done some digging, and the only place Py_Initialize() is called in the OBS source code is in obs-scripting-python.c (in obs_scripting_load_python()), shortly after some code that changes the environment variables PATH and PYTHONPATH, as well as PYTHONHOME through Py_SetPythonHome(). Most of the responses to the StackOverflow thread on this error message involve these environment variables, and many recommend simply not having them set at all - which is the case in my environment.

If I run printenv in the terminal, neither PYTHONPATH nor PYTHONHOME show up; which python prints /Users/[username]/miniconda3/bin/python and which python3 prints /Users/[username]/miniconda3/bin/python3. Both installations work fine, and changing the PATH to make other installations of python the default doesn't fix the error. Neither does setting PYTHONPATH or PYTHONHOME to point to the directories described in the thread (as adapted to my file system).

Crash log here: https://pastebin.com/hFCeHQBA (unsure how helpful it will be in this case).
 

Fenrir

Forum Admin
Python should have been disabled on macOS, as we have had issues. This was an oversight that it was shipped enabled.
 
Top