linuxmint / hypnotix

An M3U IPTV Player
1.23k stars 168 forks source link

Hypnotix fail to start (libmpv problem) #254

Open matthgyver opened 1 year ago

matthgyver commented 1 year ago

Hi,

Since last update on Arch linux, Hypnotix fail to start with this error:

Traceback (most recent call last):
File "/usr/lib/hypnotix/hypnotix.py", line 25, in <module>
    import mpv
File "/usr/lib/hypnotix/mpv.py", line 531, in <module>
    _handle_func('mpv_detach_destroy',          [],                                         None, errcheck=None)
File "/usr/lib/hypnotix/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/lib/libmpv.so.2: undefined symbol: mpv_detach_destroy

MPV infos:

mpv --version
mpv 0.35.0 Copyright © 2000-2022 mpv/MPlayer/mplayer2 projects
    built on UNKNOWN
FFmpeg library versions:
    libavutil       57.28.100
    libavcodec      59.37.100
    libavformat     59.27.100
    libswscale      6.7.100
    libavfilter     8.44.100
    libswresample   4.7.100
FFmpeg version: n5.1.2

Have you an idea about this problem please ?

Thanks

Axel-Erfurt commented 1 year ago

What's the output of

ldconfig -p | grep libmpv

mpv_detach_destroy is deprecated, you can try

replace mpv_detach_destroy with mpv_destroy in /usr/lib/hypnotix/mpv.py

matthgyver commented 1 year ago

Hi,

ldconfig -p | grep libmpv
libmpv.so.2 (libc6,x86-64) => /usr/lib/libmpv.so.2
libmpv.so (libc6,x86-64) => /usr/lib/libmpv.so

It's work with your suggestion. Thanks

Axel-Erfurt commented 1 year ago

Mint has no libmpv.so.2

libmpv.so.1 (libc6,x86-64) => /lib/x86_64-linux-gnu/libmpv.so.1

adocampo commented 1 year ago

replace mpv_detach_destroy with mpv_destroy in /usr/lib/hypnotix/mpv.py

Yes, hypnotix stopped working a pair of days ago on arch. Your suggestion did the trick.

Thank you very much

Mennaruuk commented 1 year ago

What's the output of

ldconfig -p | grep libmpv

mpv_detach_destroy is deprecated, you can try

replace mpv_detach_destroy with mpv_destroy in /usr/lib/hypnotix/mpv.py

Does anyone know how to fix this Hypnotix issue for Ubuntu 22.10? I tried replacing mpv_detach_destroy with mpv_destroy in /usr/lib/hypnotix/mpv.py, however, that failed to resolve the problem.

bobby285271 commented 1 year ago

replace mpv_detach_destroy with mpv_destroy in /usr/lib/hypnotix/mpv.py

I can confirm this also fixes the issue on NixOS and https://github.com/jaseg/python-mpv/commit/2b3249a73ddf23a4285538dcf1dbe4241374de70 did the same thing. A quick look at https://github.com/mpv-player/mpv/blob/v0.34.1/libmpv/client.h#L502 and https://github.com/mpv-player/mpv/blob/v0.34.1/player/client.c#L557 what mpv_detach_destroy in mpv 0.34.1 does is simply calling mpv_destroy, so I guess it should be okay for mint to fix this now?

Does anyone know how to fix this Hypnotix issue for Ubuntu 22.10?

https://packages.ubuntu.com/search?keywords=libmpv&searchon=names says ubuntu 22.10 does not have libmpv2 yet, I guess what you encountered is not related to this issue?

joaoeudes7 commented 1 year ago

Thanks @Mennaruuk! Works here!

TheGarageRocks commented 1 year ago

What's the output of

ldconfig -p | grep libmpv

mpv_detach_destroy is deprecated, you can try

replace mpv_detach_destroy with mpv_destroy in /usr/lib/hypnotix/mpv.py

This fixed it for me on Debian Sid ! Thanks !!!

levimaen commented 1 year ago

help required: Hypnotix stop working after installing Linux mint 21.11 this are the results in the terminal niso@niso-HP-ProDesk-600-G2-SFF:~$ GDK_BACKEND=x11 hypnotix niso@niso-HP-ProDesk-600-G2-SFF:~$ Loading providers... XTREAM Niso Loading Channels

(hypnotix.py:9325): Gdk-ERROR **: 00:56:53.917: The program 'hypnotix.py' received an X Window System error. This probably reflects a bug in the program. The error was 'BadRequest (invalid request code or no such operation)'. (Details: serial 1610 error_code 1 request_code 0 (core protocol) minor_code 0) (Note to programmers: normally, X errors are reported asynchronously; that is, you will receive the error a while after causing it. To debug your program, run it with the GDK_SYNCHRONIZE environment variable to change this behavior. You can then get a meaningful backtrace from your debugger if you break on the gdk_x_error() function.)

Sadi58 commented 7 months ago

I installed Hypnotix today on Debian Trixie using the file hypnotix_4.3_all.deb from Mint repositories, and also the file "python3-imdbpy_2021.04.18-3_all.deb" from the old Debian repositories (I wonder why it doesn't exist in the current Debian repositories?) However, after fixing the "mpv_detach_destroy" issue as above, I now get this terminal output:

System version of yt-dlp selected.
Traceback (most recent call last):
  File "/usr/lib/hypnotix/hypnotix.py", line 27, in <module>
    import mpv
  File "/usr/lib/hypnotix/mpv.py", line 53, in <module>
    backend = CDLL(sofile)
              ^^^^^^^^^^^^
  File "/usr/lib/python3.11/ctypes/__init__.py", line 376, in __init__
    self._handle = _dlopen(self._name, mode)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^
OSError: /lib/x86_64-linux-gnu/libmpv.so.2: undefined symbol: av_packet_side_data_get, version LIBAVCODEC_60

I hope someone can suggest a fix for this also as easy as the one above. ;-)