jaseg / python-mpv

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

Importing mpv gives error. #225

Closed anacktice closed 2 years ago

anacktice commented 2 years ago

I am working on a media player project using python and I was trying to use python-mpv for it but when I try to import the module it gives error.

Here is the error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "E:\Programming\Web2Desk\mpv.py", line 566, in <module>
    _handle_func('mpv_abort_async_command',     [c_ulonglong],                              None, errcheck=None)

  File "E:\Programming\Web2Desk\mpv.py", line 502, in _handle_func
    func = getattr(backend, name)

  File "C:\Users\Shreyansh\AppData\Local\Programs\Python\Python39\lib\ctypes\__init__.py", line 387, in __getattr__       
    func = self.__getitem__(name)

  File "C:\Users\Shreyansh\AppData\Local\Programs\Python\Python39\lib\ctypes\__init__.py", line 392, in __getitem__       
    func = self._FuncPtr((name_or_ordinal, self))

AttributeError: function 'mpv_abort_async_command' not found
jaseg commented 2 years ago

Hi there, that is likely because your libmpv is too old. Try installing a more recent libmpv, or an older python-mpv. You can downgrade python-mpv using pip install 'python-mpv==1.2.3' where 1.2.3 can be any older version listed on pypi.