python-mpv icon indicating copy to clipboard operation
python-mpv copied to clipboard

ValueError during initialization: -4 / invalid value for mpv parameter

Open maximst opened this issue 7 years ago • 1 comments
trafficstars

When i try initialize mpv with python-mpv from master:

>>> import mpv
>>> mpv.MPV()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/max/src/mpv/mpv.py", line 552, in __init__
    _mpv_initialize(self.handle)
  File "/home/max/src/mpv/mpv.py", line 102, in raise_for_ec
    raise ex(ec, *args)
ValueError: ('Invalid value for mpv parameter', -4, (<MpvHandle object at 0x7fa4a5d53048>,))

MPV version

$ mpv --version
mpv git-2018-05-17-05b392b Copyright © 2000-2018 mpv/MPlayer/mplayer2 projects
 built on Sun May 20 01:05:19 UTC 2018
ffmpeg library versions:
   libavutil       56.18.102
   libavcodec      58.19.102
   libavformat     58.15.100
   libswscale      5.2.100
   libavfilter     7.24.100
   libswresample   3.2.100
ffmpeg version: git-2018-05-19-411f714

maximst avatar Aug 28 '18 13:08 maximst

Sounds weird. I'd start by double-checking the python version running (only python 3 is supported) and that the libmpv loaded by python matches your mpv version. On some distros, libmpv and mpv are separate packages and one might have a different version than the other. One way to check which libmpv is loaded is to run lsof -p $pid on the $pid of the python process in question.

jaseg avatar Oct 16 '18 01:10 jaseg