2

I'm trying to use the video player mpv with vapoursynth filter, which itself uses Python 3, as external player in the media center Kodi. mpv shortly flashes up in the Dock, then it crashes, accompanied with the error message: "mpv quit unexpectedly." and the terminal output

Fatal Python error: Py_Initialize: unable to load the file system codec
ImportError: No module named 'encodings'

When starting mpv through the terminal or dragging a file onto it, it's all fine, no crash.

I'm using OS X 10.10.4 Yosemite and tried several versions of mpv and Kodi. I used homebrew to install Kodi, mpv, vapoursynth and python3.

The crash report: http://pastebin.com/1JLcMb6D

Other things I can provide:

$ whereis python
/usr/bin/python

(but Python 3.4 is also located in /usr/local/Cellar/python3/3.4.3/, installed with brew)

echo $PYTHONPATH
(nothing)

mpv -> vapoursynth -> fine

Kodi -> mpv -> vapoursynth -> Python error

Why does it only occur when calling it from within Kodi?

MarianD
  • 13,096
  • 12
  • 42
  • 54
RyuX51
  • 2,779
  • 3
  • 26
  • 33

1 Answers1

1

In the meantime I found it out by myself:

Kodi has a built-in Python 2 interpreter and is - even in the upcoming version 15 - still not using the Python 3 interpreter introduced in December 2008. Obviously the script, which needs Python 3, will not run when called from that environment.

RyuX51
  • 2,779
  • 3
  • 26
  • 33