diff --git a/src/Main/MainCmd.cpp b/src/Main/MainCmd.cpp index 8dba8a5ef2..01ffa7bd78 100644 --- a/src/Main/MainCmd.cpp +++ b/src/Main/MainCmd.cpp @@ -100,7 +100,7 @@ int main(int argc, char** argv) msg << "While initializing " << appName << " the following exception occurred: '" << e.what() << "'\n\n"; msg << "Python is searching for its runtime files in the following directories:\n" - << Py_EncodeLocale(Py_GetPath(), nullptr) << "\n\n"; + << Base::Interpreter().getPythonPath() << "\n\n"; msg << "Python version information:\n" << Py_GetVersion() << "\n"; const char* pythonhome = getenv("PYTHONHOME"); if (pythonhome) { diff --git a/src/Main/MainGui.cpp b/src/Main/MainGui.cpp index bcb07ffd19..1066298cab 100644 --- a/src/Main/MainGui.cpp +++ b/src/Main/MainGui.cpp @@ -266,7 +266,7 @@ int main(int argc, char** argv) "Python version information:\n%4\n") .arg(appName, QString::fromUtf8(e.what()), - QString::fromUtf8(Py_EncodeLocale(Py_GetPath(), nullptr)), + QString::fromStdString(Base::Interpreter().getPythonPath()), QString::fromLatin1(Py_GetVersion())); const char* pythonhome = getenv("PYTHONHOME"); if (pythonhome) {