jaseg / python-mpv

Python interface to the awesome mpv media player
https://git.jaseg.de/python-mpv.git
Other
531 stars 67 forks source link

AttributeError: /usr/lib64/libmpv.so.2: undefined symbol: mpv_detach_destroy #244

Closed sumdog closed 1 year ago

sumdog commented 1 year ago

It looks like with mpv 0.35.0, mpv_detach_destroy is now depreciated, and now Python applications attempting to use python-mpv will just crash:

  File "/home/cassius/workspace/mpworkshop/mediahug/gui/viewtab/player.py", line 3, in <module>
    import mpv
  File "/home/cassius/.cache/pypoetry/virtualenvs/mediahug-aAjdAo30-py3.10/lib/python3.10/site-packages/mpv.py", line 531, in <module>
    _handle_func('mpv_detach_destroy',          [],                                         None, errcheck=None)
  File "/home/cassius/.cache/pypoetry/virtualenvs/mediahug-aAjdAo30-py3.10/lib/python3.10/site-packages/mpv.py", line 478, in _handle_func
    func = getattr(backend, name)
  File "/usr/lib/python3.10/ctypes/__init__.py", line 387, in __getattr__
    func = self.__getitem__(name)
  File "/usr/lib/python3.10/ctypes/__init__.py", line 392, in __getitem__
    func = self._FuncPtr((name_or_ordinal, self))
AttributeError: /usr/lib64/libmpv.so.2: undefined symbol: mpv_detach_destroy

Confirmed downgrading back to mpv 0.34 works.

hustodemon commented 1 year ago

Which version of python-mpv are you using? Looks like the newest one works (mpv_detach_destroy is not used anymore there).

jaseg commented 1 year ago

@sumdog This looks like you did pip install mpv instead of pip install python-mpv. There is an outdated version of this library on pypi under a project that I don't have access to, and I haven't managed to sort out this yet.