You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I develop a program based on python-vlc and noticed that on Ubuntu 20.04 the last version of vlc.py (3.0.11115) does not find the VLC libraries when VLC is installed with the snap method (VLC media player 3.0.11 Vetinari revision 3.0.11-0-gdc0c5ced72)
python3 vlc.py
dll:<CDLL 'None', handle 7fe7ea63b190 at 0x7fe7e98de6d0> plugin_path: None
Traceback (most recent call last):
File "vlc.py", line 8624, in
instance = Instance(["--sub-source=marq"] + sys.argv[1:])
File "vlc.py", line 1885, in new
return libvlc_new(len(args), args)
File "vlc.py", line 4684, in libvlc_new
_Cfunction('libvlc_new', ((1,), (1,),), class_result(Instance),
File "vlc.py", line 294, in _Cfunction
raise NameError('no function %r' % (name,))
NameError: no function 'libvlc_new'
I removed VLC and reinstalled it with the apt method (VLC media player 3.0.9.2-1)
The libraries are recognized but the Instance class returns a None value:
Python 3.8.5 (default, Jul 28 2020, 12:59:40)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
Thanks for reporting this. It seems there are 2 issues here: the first one concerning snaps and the other one concerning a standard install that does not work.
For the first one, I would guess (as mentioned in https://stackoverflow.com/a/52061853 ) that snaps are not meant to be reusable components, just self-contained and isolated runnable versions of a given application. There should be ways to hack some support or find some snap-specific API or mechanism (see the find_lib function at the beginning of vlc.py) to try to automatically handle this situation, but I lack knowledge about snap to know whether this is a desirable approach. Feel free to investigate and propose solutions.
For the second one, it would be better handled in another issue (given the title of this one). Could you report it as a new issue, with additional information like the messages displayed when trying to instanciate with the verbose flag:
Hi,
Thank you for the explanation on snap. I put a warning on the web site (I knew for snap) when VLC begins to be pre-installed with snap on Ubuntu.
I started a new issue for python-vlc on Ubuntu 20.04: #157
Hi,
thank you for your work on Python VLC binding.
I develop a program based on python-vlc and noticed that on Ubuntu 20.04 the last version of vlc.py (3.0.11115) does not find the VLC libraries when VLC is installed with the snap method (VLC media player 3.0.11 Vetinari revision 3.0.11-0-gdc0c5ced72)
python3 vlc.py
dll:<CDLL 'None', handle 7fe7ea63b190 at 0x7fe7e98de6d0> plugin_path: None
Traceback (most recent call last):
File "vlc.py", line 8624, in
instance = Instance(["--sub-source=marq"] + sys.argv[1:])
File "vlc.py", line 1885, in new
return libvlc_new(len(args), args)
File "vlc.py", line 4684, in libvlc_new
_Cfunction('libvlc_new', ((1,), (1,),), class_result(Instance),
File "vlc.py", line 294, in _Cfunction
raise NameError('no function %r' % (name,))
NameError: no function 'libvlc_new'
I removed VLC and reinstalled it with the apt method (VLC media player 3.0.9.2-1)
The libraries are recognized but the Instance class returns a None value:
Python 3.8.5 (default, Jul 28 2020, 12:59:40)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
The last vlc.py works well on Ubuntu 18.04.5 LTS with vlc install with apt (VLC 3.0.8)
Thank you for checking this, I am available to do some tests
Best,
Olivier
The text was updated successfully, but these errors were encountered: