Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python-mpv should issue a clear error report for known-incompatible libmpv versions #223

Closed
SnoopJ opened this issue Jun 13, 2022 · 1 comment

Comments

@SnoopJ
Copy link
Contributor

SnoopJ commented Jun 13, 2022

In versions of python-mpv after v0.5.2, a libmpv older than 0.33 (API version 1.108) causes an obscure error because of a missing symbol:

$ python3 -c "import mpv"
Traceback (most recent call last):
  File "/home/snoopjedi/repos/python-mpv/mpv.py", line 579, in <module>
    _handle_func('mpv_event_to_node',           [POINTER(MpvNode), POINTER(MpvEvent)],      c_int, ec_errcheck, ctx=None)
  File "/home/snoopjedi/repos/python-mpv/mpv.py", line 502, in _handle_func
    func = getattr(backend, name)
  File "/home/snoopjedi/.pyenv/versions/3.9.4/lib/python3.9/ctypes/__init__.py", line 387, in __getattr__
    func = self.__getitem__(name)
  File "/home/snoopjedi/.pyenv/versions/3.9.4/lib/python3.9/ctypes/__init__.py", line 392, in __getitem__
    func = self._FuncPtr((name_or_ordinal, self))
AttributeError: /lib/x86_64-linux-gnu/libmpv.so.1: undefined symbol: mpv_event_to_node

Because this symbol is introduced in libmpv 0.33 and is not optional for python-mpv, this known incompatibility can be reported more directly by telling the user that their libmpv and python-mpv are incompatible with each other.

Issues this style of minimum-API reporting can help with: #212, #131, #116, #33, #32

@jaseg
Copy link
Owner

jaseg commented Jun 16, 2022

That's a good idea. I wasn't aware so many people are using older libmpvs, and I seem to have caused some trouble with the latest release using these newer library symbols.

@jaseg jaseg closed this as completed in 4a85543 Jun 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants