1

When trying to create a vlc.Instance()

    Instance = vlc.Instance()

I get the following error (in my replit console)

    Traceback (most recent call last):
       File "main.py", line 9, in <module>
          Instance = vlc.Instance()
       File "/home/runner/personal-assistant/venv/lib/python3.8/site-packages/vlc.py", line 1814, in __new__
          return libvlc_new(len(args), args)
       File "/home/runner/personal-assistant/venv/lib/python3.8/site-packages/vlc.py", line 4978, in libvlc_new
          _Cfunction('libvlc_new', ((1,), (1,),), class_result(Instance),
       File "/home/runner/personal-assistant/venv/lib/python3.8/site-packages/vlc.py", line 302, in _Cfunction
          raise NameError('no function %r' % (name,))
    NameError: no function 'libvlc_new'  

Can someone please explain to me why this is happening and how I can fix this problem? I've looked all over online for answers but I can't find any that work (for replit).

CR130
  • 98
  • 7

1 Answers1

0

I had the same problem (outside of replit) and maybe my solution works for you.

The error might occur for 2 reasons:

#1 vlc is not installed on your system.

  • python-vlc is just an interface

#2 vlc is installed (via Snap store), but for some reason doesn't work.

  • uninstall vlc and and proceed with the rest:

Install vlc (Ubuntu):

sudo apt update 

sudo apt install vlc

Hope this helps!

Quickroot
  • 3
  • 3
  • this doesnt work -- I have contacted replit support on the issue and they are working on it -- please check to make sure your solutions work before posting them! – CR130 Oct 03 '22 at 16:31
  • I had the same problem, outside of replit, and the solution I presented worked for me. But apparently that did not translate to replit. I apologize for not stating that. – Quickroot Oct 04 '22 at 13:24