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

Using python-vlc on Linux #4506

Closed
marioortizmanero opened this issue Oct 29, 2019 · 19 comments
Closed

Using python-vlc on Linux #4506

marioortizmanero opened this issue Oct 29, 2019 · 19 comments
Assignees
Labels
area:hooks Caused by or effecting some hook bug platform:Linux

Comments

@marioortizmanero
Copy link

marioortizmanero commented Oct 29, 2019

#3448 is the same issue, but specifically for Windows, which was fixed by adding libvlc and a couple more files into the binary. Another related issue is #4369.

I did make it work on Windows but I can't do it on Linux. I've tried copying into the contents from /usr/lib/vlc, like what was done in the Windows issue, but nothing. Also with libvlc and libvlccore, and many more.

I'm using the last version of pyinstaller, python 3.7 and Ubuntu 19.04. Doesn't work on Arch Linux either.

Has anyone else faced this issue?


Minimal file:

import vlc

instance = vlc.Instance()
media_player = instance.media_player_new()

Output: (no other hints by passing --verbose 3 as an argument, or --debug to pyinstaller.)

Traceback (most recent call last):
  File "vlctest.py", line 4, in <module>
    media_player = instance.media_player_new()
AttributeError: 'NoneType' object has no attribute 'media_player_new'
[116929] Failed to execute script vlctest

Used specfile:

# -*- mode: python ; coding: utf-8 -*-

block_cipher = None

a = Analysis(['vlctest.py'],
             pathex=['/home/mario/Programming/spotivids/dev'],
             binaries=[],
             datas=[('/usr/lib/libvlc.so', '.'),
                    ('/usr/lib/libvlccore.so', '.'),
                    ('/usr/lib/vlc/plugins', 'plugins'),
                    ('/usr/lib/vlc/libvlc_pulse.so', '.'),
                    ('/usr/lib/vlc/libvlc_vdpau.so', '.'),
             ],
             hiddenimports=[],
             hookspath=[],
             runtime_hooks=[],
             excludes=[],
             win_no_prefer_redirects=False,
             win_private_assemblies=False,
             cipher=block_cipher,
             noarchive=False)

pyz = PYZ(a.pure, a.zipped_data,
             cipher=block_cipher)

exe = EXE(pyz,
          a.scripts,
          [],
          exclude_binaries=True,
          name='vlctest',
          debug=False,
          bootloader_ignore_signals=False,
          strip=False,
          upx=True,
          console=True )

coll = COLLECT(exe,
               a.binaries,
               a.zipfiles,
               a.datas,
               strip=False,
               upx=True,
               upx_exclude=[],
               name='vlctest')

Warnings file:

missing module named _winapi - imported by encodings (delayed, conditional, optional), subprocess (conditional)
missing module named msvcrt - imported by subprocess (conditional), vlc (conditional, optional), getpass (optional)
missing module named nt - imported by os (conditional, optional), ntpath (conditional, optional), shutil (conditional)
missing module named org - imported by copy (optional)
missing module named winreg - imported by platform (delayed, optional), mimetypes (optional), vlc (delayed, conditional, optional), urllib.request (delayed, conditional, optional)
missing module named vms_lib - imported by platform (delayed, conditional, optional)
missing module named 'java.lang' - imported by platform (delayed, optional), xml.sax._exceptions (conditional)
missing module named java - imported by platform (delayed)
missing module named _scproxy - imported by urllib.request (conditional)
missing module named _winreg - imported by platform (delayed, optional), vlc (delayed, conditional, optional)
missing module named _frozen_importlib_external - imported by importlib._bootstrap (delayed), importlib (optional), importlib.abc (optional)
excluded module named _frozen_importlib - imported by importlib (optional), importlib.abc (optional)
missing module named 'org.python' - imported by pickle (optional), xml.sax (delayed, conditional)
missing module named distro - imported by vlc (delayed, conditional, optional)
@ScamCast
Copy link

ScamCast commented Nov 5, 2019

Hello, did you figure out a solution for this? I'm using VLC in my Tkinter app but haven't got to the pyinstaller part yet. Kinda worried I'm gonna run into this same situation.

Thanks

@marioortizmanero
Copy link
Author

marioortizmanero commented Nov 5, 2019

No, I still don't know what I'm missing. I'm currently trying pyqtdeploy instead, as my project uses Qt. But it'd be nice to solve this too.

Edit: I can't seem to figure pyqtdeploy out so I'm still stuck with this...

@ScamCast
Copy link

I'm just about finished up with my VLC Python project, I'm gonna see if I can find a solution to this. Give me a few days and I'll report back.

@marioortizmanero
Copy link
Author

Any luck, @ScamCast?

@aclbandit
Copy link

aclbandit commented Feb 12, 2020

@marioortizmanero , I'm having a very similar problem: after packaging with pyinstaller an application that relies on python-vlc, I end up with error

AttributeError: 'NoneType' object has no attribute 'media_player_new'

same as you. I found your issue report and bookmarked it in hope of some solution, but finally found a solution myself.

Environment:
Python 3.7.6, Fedora 31 (x86_64), PyInstaller 3.6

To figure out what was wrong, I started out by using PyInstaller to create a onefile executable of vlc.py. When running and providing the right args, that binary failed the exact same way! So, now it's clear that it's not a problem with my application, but rather with something in vlc.py.

Looking around the area where it throws that exception, in the "new" method of the "Instance" class of vlc.py, there's this bit:

       if plugin_path is not None:
            # set plugin_path if detected, win32 and MacOS,
            # if the user did not specify it itself.
            os.environ.setdefault('VLC_PLUGIN_PATH', plugin_path)

By specifying a VLC_PLUGIN_PATH environment variable, everything works as expected! It's an exciting workaround:

export VLC_PLUGIN_PATH=/usr/lib64/vlc/plugins/

I don't know where your plugins directory is for vlc, but find it and set that environment variable. You can even do this at the beginning of your application:

os.environ["VLC_PLUGIN_PATH"] = "/usr/lib64/vlc/plugins"

I'll see if I can dig down any further and figure out why this environment var isn't set already for me, or what's wrong in vlc.py to cause it to be unable to figure out the right answer. However, I can at least work around the problem for now, and hopefully submit a pull request to vlc (or whoever it is that's got a bug) in the future.

@ScamCast
Copy link

@aclbandit Thanks for the find. I've had my project on hold for a while that needed this fix. I'll give it a shot soon.

Thanks again!

@marioortizmanero
Copy link
Author

marioortizmanero commented Feb 12, 2020

That's an awesome fix @aclbandit! Thanks for sharing it on here and dedicating it some time. I will try it soon and report back, too.

Update: your workaround worked for me. It has to be run whenever the app starts, so it's a bit of a dirty hack. But for now it works so it's enough for me. Should this be reported to python-vlc, then?

@aclbandit
Copy link

@marioortizmanero , I wouldn't go so far as to call it a 'fix' -- definitely a workaround at best. Since things like this, when built via pyinstaller, ought to 'just work,' there's a bug someplace that needs reported, fixed, etc. Just need the time to dedicate to tracking it down...

But anyway, for both of you, you're welcome. I hope it helps you.

@Legorooj
Copy link
Member

Sorry this issue didn't get attention sooner. PyInstaller needs a runtime hook for vlc it appears. Surprisingly there's nil documentation covering how to write them. I'll get back to you soon with more info!

@Legorooj Legorooj self-assigned this Feb 21, 2020
@Legorooj Legorooj added area:hooks Caused by or effecting some hook bug labels Feb 21, 2020
@ScamCast
Copy link

ScamCast commented Mar 8, 2020

Made a new little discovery today that is sort of related to this issue and thought I'd share it. Figured out how to build the windows exe file without having to include the plugins folder and all the DLL's. All that is required is you have VLC installed.

For some reason, there is an issue when the DLL's are imported in vlc.py
First you have to open up vlc.py and on line 161, right before os.chdir, you have to add:

ctypes.windll.kernel32.SetDllDirectoryW(None)

so it should look like this:

if plugin_path is not None:  # try loading
    p = os.getcwd()
    ctypes.windll.kernel32.SetDllDirectoryW(None)
    os.chdir(plugin_path)
    # if chdir failed, this will raise an exception
    dll = ctypes.CDLL(libname)
    # restore cwd after dll has been loaded
    os.chdir(p)

Not sure if it would be better to add it at the very beginning of the find_lib() function, but this is just what works in my situation.

Now here's how my spec file looks like:

windows.spec

block_cipher = None

a = Analysis(['vlc-test.py'],
             pathex=[''],
             binaries=[],
             datas=[],
             hiddenimports=[],
             hookspath=[],
             runtime_hooks=[],
             excludes=[],
             win_no_prefer_redirects=False,
             win_private_assemblies=False,
             cipher=block_cipher,
             noarchive=False)

pyz = PYZ(a.pure, a.zipped_data,
             cipher=block_cipher)

exe = EXE(pyz,
          a.scripts,
          a.binaries,
          a.zipfiles,
          a.datas,
          [],
          icon=None,
          exclude_binaries=False,
          name='vlc_test',
          debug=True,
          bootloader_ignore_signals=False,
          strip=False,
          upx=False,
          console=True)

Build the file:
pyinstaller --onefile --noconfirm windows.spec

After opening vlc_test.exe, it loads with no issues.

Here is the python file that I was using for test purposes:
https://github.com/oaubert/python-vlc/blob/master/examples/tkvlc.py

Hopefully this helps someone out.

Update:
If you don't want to edit your vlc.py file, I found that adding it before "import vlc" also works too. :)

from ctypes import windll
windll.kernel32.SetDllDirectoryW(None)
import vlc

Update 2:

My fix for this was accepted
oaubert/python-vlc/pull/121

@Sumit1673
Copy link

Made a new little discovery today that is sort of related to this issue and thought I'd share it. Figured out how to build the windows exe file without having to include the plugins folder and all the DLL's. All that is required is you have VLC installed.

For some reason, there is an issue when the DLL's are imported in vlc.py
First you have to open up vlc.py and on line 161, right before os.chdir, you have to add:

ctypes.windll.kernel32.SetDllDirectoryW(None)

so it should look like this:

if plugin_path is not None:  # try loading
    p = os.getcwd()
    ctypes.windll.kernel32.SetDllDirectoryW(None)
    os.chdir(plugin_path)
    # if chdir failed, this will raise an exception
    dll = ctypes.CDLL(libname)
    # restore cwd after dll has been loaded
    os.chdir(p)

Not sure if it would be better to add it at the very beginning of the find_lib() function, but this is just what works in my situation.

Now here's how my spec file looks like:

windows.spec

block_cipher = None

a = Analysis(['vlc-test.py'],
             pathex=[''],
             binaries=[],
             datas=[],
             hiddenimports=[],
             hookspath=[],
             runtime_hooks=[],
             excludes=[],
             win_no_prefer_redirects=False,
             win_private_assemblies=False,
             cipher=block_cipher,
             noarchive=False)

pyz = PYZ(a.pure, a.zipped_data,
             cipher=block_cipher)

exe = EXE(pyz,
          a.scripts,
          a.binaries,
          a.zipfiles,
          a.datas,
          [],
          icon=None,
          exclude_binaries=False,
          name='vlc_test',
          debug=True,
          bootloader_ignore_signals=False,
          strip=False,
          upx=False,
          console=True)

Build the file:
pyinstaller --onefile --noconfirm windows.spec

After opening vlc_test.exe, it loads with no issues.

Here is the python file that I was using for test purposes:
https://github.com/oaubert/python-vlc/blob/master/examples/tkvlc.py

Hopefully this helps someone out.

Update:
If you don't want to edit your vlc.py file, I found that adding it before "import vlc" also works too. :)

from ctypes import windll
windll.kernel32.SetDllDirectoryW(None)
import vlc

Update 2:

My fix for this was accepted
oaubert/python-vlc/pull/121

Fix looks good. I am also facing this issue but could not resolve it. I tried adding the windll.kernel32.SetDllDirectoryW(None) before import vlc but it didn't work. :(. I am not sure what happened.
Also, I added the same command inside the vlc.py. The error which I get now while building the .exe is the missign libvlc.dll. Before it was module not found vlc. Don't know what to do. Please help.

@ScamCast
Copy link

@Sumit1673 can I see what your spec looks like?

@Sumit1673
Copy link

@ScamCast Thank you for your time. I solved the missing libvlc.dll error by changing the installed VLC from 32bit to 64 bit. It started working normally using PyCharm IDE. Now, when I try to run it as a .exe I am facing a new error. Below is the image attached.

error2

@Sumit1673
Copy link

Sumit1673 commented Mar 18, 2020

@ScamCast Here is my spec file:
[# -- mode: python ; coding: utf-8 --

block_cipher = None

a = Analysis(['controller.py'],
pathex=['D:\Speechrecog\16march_2020\Frenchuolinguo-master\Frenchuolinguo'],
binaries=[],
datas=[],
hiddenimports=[],
hookspath=[],
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False)
pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)](url)
exe = EXE(pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
[],
name='controller',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
upx_exclude=[],
runtime_tmpdir=None,
console=True )

UPDATE:
I added the lines which you mentioned on your post before we import vlc. I did that for a small test application which just plays an audio file present in the same folder and it worked. But when I do the same for my actual application which consists of 3 .py files and one of which uses vlc. I added the lines in all the three files but it didn't work. Gives the same error as above. Not sure at all whats going on.

Here is my script which works:

from ctypes import windll
windll.kernel32.SetDllDirectoryW(None)
import vlc
import time
import sys
if name == 'main':

import sys
player = vlc.MediaPlayer("File1.wav")
player.play()
# time.sleep(10)
sys.exit(0)

This code works only if I add the first two lines.
Following this idea which I found from here:
https://github.com/pyinstaller/pyinstaller/issues/4506#issuecomment-600492106

However, my actual application does not run whatever I do. The second script is below:

from ctypes import windll
windll.kernel32.SetDllDirectoryW(None)
from vlc import MediaPlayer

import vlc

import os
import sys
import re

from google.cloud import speech
from google.cloud.speech import enums
from google.cloud.speech import types
from text2speech import convert_text
from google_audio import file_speech2text as fs2t
from google_live import MicrophoneStream

os.environ["GOOGLE_APPLICATION_CREDENTIALS"] = "key23.json"
RATE = 16000 # 10000
CHUNK = int(RATE / 10) # 100ms

class BackendModel:
""" Backend code to update the information to be presented in the viewer"""

def __init__(self):
    pass

def play_audio_file(self, audio_file, prev_player_obj):
    try:
        if audio_file is not None:
            player = MediaPlayer(audio_file)
            if player is None:
                return None
            else:
                player.play()
            return player
    except Exception as e:
        print(e)

def set_microphone(self, text_box):
    # See http://g.co/cloud/speech/docs/languages
    # for a list of supported languages.
    language_code = 'fr-FR'  # a BCP-47 language tag

    client = speech.SpeechClient()
    config = types.RecognitionConfig(
        encoding=enums.RecognitionConfig.AudioEncoding.LINEAR16,
        sample_rate_hertz=RATE,
        language_code=language_code)
    streaming_config = types.StreamingRecognitionConfig(
        config=config,
        interim_results=True)

    with MicrophoneStream(RATE, CHUNK) as stream:

        # format = stream._audio_interface.get_sample_size(FORMAT)
        audio_generator = stream.generator()
        requests = (types.StreamingRecognizeRequest(audio_content=content)
                    for content in audio_generator)
        responses = client.streaming_recognize(streaming_config, requests)
        self.listen_print_loop(responses, text_box)

def listen_print_loop(self, responses, text_box):
    num_chars_printed = 0
    for response in responses:
        if not response.results:
            continue
        result = response.results[0]
        if not result.alternatives:
            continue
        transcript = result.alternatives[0].transcript
        overwrite_chars = ' ' * (num_chars_printed - len(transcript))
        if not result.is_final:
            sys.stdout.write(transcript + overwrite_chars + '\r')
            sys.stdout.flush()
            num_chars_printed = len(transcript)
        else:
            text_box.append(transcript + overwrite_chars)
            if re.search(r'\b(exit|quit)\b', transcript, re.I):
                print('Exiting..')
                break
            num_chars_printed = 0
            # if self._timer.join():
            return

def speech_to_text(self, audio_file):
    return fs2t(audio_file)

@staticmethod
def text_to_speech(output_folder, text):
    tts, filename = convert_text(text)
    filename = output_folder + filename
    tts.save(filename)
    player = MediaPlayer(filename)
    player.play()
    return filename

if name == "main":
c= BackendModel()
c.play_audio_file("File1.wav", 0)

Error
error2

@MateKristof
Copy link

MateKristof commented Apr 2, 2020

I have a three +1 step solution for this problem:

Working with pyinstaller onefile "exe" like a charm

  1. Copy the "VLC" folder from the C:\Program Files\VideoLAN

  2. Paste only the VLC\plugin folder and the 2 dll files to the project root folder:

    • PycharmProjects\root\VLC\libvlc.dll
    • PycharmProjects\root\VLC\libvlccore.dll
    • PycharmProjects\root\VLC\plugins
  3. Install and use Python 3.8 interpreter and use this code section to import vlc:

try:
    # PyInstaller creates a temp folder and stores path in _MEIPASS
    base_path = sys._MEIPASS
except AttributeError:
    base_path = os.path.abspath(".")

# Python 3.8 things:
with os.add_dll_directory(os.path.join(base_path, "VLC")):
    import vlc

+1. Don't forget to add "VLC" folder to .spec file, like this:

datas=[('C:/Users/******/PycharmProjects/root/VLC', 'VLC/')],

I think this will helpful for You on Linux side. In my best of opinion os.add_dll_directory() should work on non Windows system too
Maybe expand the code with these lines:

def resource_path(relative_path):
    if (myos == 'Windows'):
        """ Get absolute path to resource, works for dev and for PyInstaller """
        try:
            # PyInstaller creates a temp folder and stores path in _MEIPASS
            base_path = sys._MEIPASS
        except AttributeError:
            base_path = os.path.abspath(".")
        
        return os.path.join(base_path, relative_path)

    elif (myos == 'Darwin') or (myos == 'Linux') :
        """ Get absolute path to resource, works for dev and for PyInstaller """
        base_path =  getattr(sys, '_MEIPASS', os.path.dirname(os.path.abspath(__file__)))
        # base_path =  os.path.dirname(os.path.abspath(__file__))
        return os.path.join(base_path, relative_path) 

@Legorooj
Copy link
Member

Legorooj commented Apr 2, 2020

@MateKristof this is good! We can figure out a solution from this.

@rizsyed1
Copy link

rizsyed1 commented Feb 1, 2021

With the minimal file as testscript.py and the spec file as specfile.py, I ran the following command and it returned the following output in terminal. This issue and traceback reported in this issue cannot be reproduced in the develop branch of Pyinstaller 4.2

(pyinstaller) riz@riz-desktop:~/Desktop/vlc$ pyinstaller --log-level DEBUG testscript.py specfile.py
18 INFO: PyInstaller: 5.0.dev0
18 INFO: Python: 3.8.5
24 INFO: Platform: Linux-5.8.0-41-generic-x86_64-with-glibc2.29
25 INFO: wrote /home/riz/Desktop/vlc/testscript.spec
25 DEBUG: Testing for UPX ...
25 INFO: UPX is not available.
26 DEBUG: script: /home/riz/Desktop/vlc/testscript.py
26 DEBUG: script: /home/riz/Desktop/vlc/specfile.py
26 INFO: Extending PYTHONPATH with paths
['/home/riz/Desktop/vlc', '/home/riz/Desktop/vlc', '/home/riz/Desktop/vlc']
30 INFO: checking Analysis
30 INFO: Building Analysis because Analysis-00.toc is non existent
30 INFO: Initializing module dependency graph...
31 INFO: Caching module graph hooks...
33 WARNING: Several hooks defined for module 'win32ctypes.core'. Please take care they do not conflict.
34 INFO: Analyzing base_library.zip ...
34 DEBUG: Collecting submodules for collections
59 DEBUG: collect_submodules - Found submodules: {'collections', 'collections.abc'}
59 DEBUG: Collecting submodules for encodings
81 DEBUG: collect_submodules - Found submodules: {'encodings.unicode_escape', 'encodings.cp424', 'encodings.ptcp154', 'encodings.cp1255', 'encodings.cp1253', 'encodings.iso8859_2', 'encodings.cp855', 'encodings.cp866', 'encodings.cp1125', 'encodings.raw_unicode_escape', 'encodings.euc_jis_2004', 'encodings.mac_latin2', 'encodings.johab', 'encodings.iso8859_9', 'encodings.mac_farsi', 'encodings.iso8859_13', 'encodings.mac_cyrillic', 'encodings.big5hkscs', 'encodings.cp875', 'encodings.koi8_u', 'encodings.hp_roman8', 'encodings', 'encodings.cp856', 'encodings.iso8859_15', 'encodings.mac_croatian', 'encodings.shift_jis', 'encodings.iso2022_jp', 'encodings.aliases', 'encodings.iso8859_16', 'encodings.mac_turkish', 'encodings.cp437', 'encodings.undefined', 'encodings.cp1252', 'encodings.cp775', 'encodings.cp865', 'encodings.iso8859_1', 'encodings.euc_kr', 'encodings.base64_codec', 'encodings.ascii', 'encodings.mac_roman', 'encodings.oem', 'encodings.cp949', 'encodings.iso8859_6', 'encodings.utf_8', 'encodings.hz', 'encodings.iso8859_14', 'encodings.cp864', 'encodings.iso2022_kr', 'encodings.koi8_t', 'encodings.mac_arabic', 'encodings.quopri_codec', 'encodings.punycode', 'encodings.bz2_codec', 'encodings.rot_13', 'encodings.cp737', 'encodings.zlib_codec', 'encodings.iso8859_4', 'encodings.cp1006', 'encodings.cp273', 'encodings.iso2022_jp_ext', 'encodings.kz1048', 'encodings.cp1256', 'encodings.iso2022_jp_3', 'encodings.koi8_r', 'encodings.mac_centeuro', 'encodings.cp861', 'encodings.cp1257', 'encodings.big5', 'encodings.iso8859_5', 'encodings.utf_16_be', 'encodings.cp1251', 'encodings.cp850', 'encodings.gb2312', 'encodings.iso2022_jp_1', 'encodings.shift_jis_2004', 'encodings.cp500', 'encodings.cp857', 'encodings.utf_32', 'encodings.cp950', 'encodings.charmap', 'encodings.utf_32_le', 'encodings.tis_620', 'encodings.iso8859_11', 'encodings.cp037', 'encodings.mac_romanian', 'encodings.mac_iceland', 'encodings.shift_jisx0213', 'encodings.cp858', 'encodings.idna', 'encodings.cp932', 'encodings.cp874', 'encodings.cp1258', 'encodings.uu_codec', 'encodings.cp862', 'encodings.cp852', 'encodings.cp1254', 'encodings.iso8859_7', 'encodings.latin_1', 'encodings.cp863', 'encodings.iso2022_jp_2', 'encodings.utf_8_sig', 'encodings.utf_7', 'encodings.utf_16', 'encodings.utf_16_le', 'encodings.hex_codec', 'encodings.iso8859_3', 'encodings.mbcs', 'encodings.euc_jisx0213', 'encodings.cp869', 'encodings.cp720', 'encodings.mac_greek', 'encodings.euc_jp', 'encodings.palmos', 'encodings.cp1140', 'encodings.cp1026', 'encodings.cp1250', 'encodings.gbk', 'encodings.utf_32_be', 'encodings.iso2022_jp_2004', 'encodings.gb18030', 'encodings.iso8859_10', 'encodings.cp860', 'encodings.iso8859_8'}
1335 INFO: Processing pre-find module path hook distutils from '/home/riz/.virtualenvs/pyinstaller/lib/python3.8/site-packages/PyInstaller/hooks/pre_find_module_path/hook-distutils.py'.
1335 INFO: distutils: retargeting to non-venv dir '/usr/lib/python3.8'
2605 INFO: Caching module dependency graph...
2646 DEBUG: Adding python files to base_library.zip
2659 INFO: running Analysis Analysis-00.toc
2659 DEBUG: Analyzing /usr/bin/python3.8
2667 DEBUG: Skipping libpthread.so.0 dependency of python3.8
2667 DEBUG: Skipping libdl.so.2 dependency of python3.8
2667 DEBUG: Skipping libc.so.6 dependency of python3.8
2667 DEBUG: Adding libexpat.so.1 dependency of python3.8 from /lib/x86_64-linux-gnu/libexpat.so.1
2667 DEBUG: Skipping libm.so.6 dependency of python3.8
2667 DEBUG: Adding libz.so.1 dependency of python3.8 from /lib/x86_64-linux-gnu/libz.so.1
2667 DEBUG: Skipping libutil.so.1 dependency of python3.8
2667 DEBUG: Analyzing /lib/x86_64-linux-gnu/libexpat.so.1
2673 DEBUG: Skipping libc.so.6 dependency of libexpat.so.1
2673 DEBUG: Analyzing /lib/x86_64-linux-gnu/libz.so.1
2681 DEBUG: Skipping libc.so.6 dependency of libz.so.1
2681 INFO: Analyzing /home/riz/Desktop/vlc/testscript.py
2683 INFO: Analyzing /home/riz/Desktop/vlc/specfile.py
2684 DEBUG: Hidden import 'codecs' already found
2684 INFO: Processing module hooks...
2684 INFO: Loading module hook 'hook-_tkinter.py' from '/home/riz/.virtualenvs/pyinstaller/lib/python3.8/site-packages/PyInstaller/hooks'...
2692 DEBUG: Skipping libpthread.so.0 dependency of _tkinter.cpython-38-x86_64-linux-gnu.so
2692 DEBUG: Skipping libm.so.6 dependency of _tkinter.cpython-38-x86_64-linux-gnu.so
2692 DEBUG: Adding libfontconfig.so.1 dependency of _tkinter.cpython-38-x86_64-linux-gnu.so from /lib/x86_64-linux-gnu/libfontconfig.so.1
2692 DEBUG: Adding libX11.so.6 dependency of _tkinter.cpython-38-x86_64-linux-gnu.so from /lib/x86_64-linux-gnu/libX11.so.6
2692 DEBUG: Adding libbsd.so.0 dependency of _tkinter.cpython-38-x86_64-linux-gnu.so from /lib/x86_64-linux-gnu/libbsd.so.0
2692 DEBUG: Adding libXdmcp.so.6 dependency of _tkinter.cpython-38-x86_64-linux-gnu.so from /lib/x86_64-linux-gnu/libXdmcp.so.6
2692 DEBUG: Adding libXrender.so.1 dependency of _tkinter.cpython-38-x86_64-linux-gnu.so from /lib/x86_64-linux-gnu/libXrender.so.1
2692 DEBUG: Adding libBLT.2.5.so.8.6 dependency of _tkinter.cpython-38-x86_64-linux-gnu.so from /lib/libBLT.2.5.so.8.6
2692 DEBUG: Skipping libxcb.so.1 dependency of _tkinter.cpython-38-x86_64-linux-gnu.so
2692 DEBUG: Adding libXss.so.1 dependency of _tkinter.cpython-38-x86_64-linux-gnu.so from /lib/x86_64-linux-gnu/libXss.so.1
2692 DEBUG: Adding libtcl8.6.so dependency of _tkinter.cpython-38-x86_64-linux-gnu.so from /lib/x86_64-linux-gnu/libtcl8.6.so
2692 DEBUG: Adding libXau.so.6 dependency of _tkinter.cpython-38-x86_64-linux-gnu.so from /lib/x86_64-linux-gnu/libXau.so.6
2692 DEBUG: Adding libfreetype.so.6 dependency of _tkinter.cpython-38-x86_64-linux-gnu.so from /lib/x86_64-linux-gnu/libfreetype.so.6
2692 DEBUG: Adding libuuid.so.1 dependency of _tkinter.cpython-38-x86_64-linux-gnu.so from /lib/x86_64-linux-gnu/libuuid.so.1
2692 DEBUG: Adding libXft.so.2 dependency of _tkinter.cpython-38-x86_64-linux-gnu.so from /lib/x86_64-linux-gnu/libXft.so.2
2692 DEBUG: Adding libtk8.6.so dependency of _tkinter.cpython-38-x86_64-linux-gnu.so from /lib/x86_64-linux-gnu/libtk8.6.so
2692 DEBUG: Skipping libdl.so.2 dependency of _tkinter.cpython-38-x86_64-linux-gnu.so
2692 DEBUG: Skipping libc.so.6 dependency of _tkinter.cpython-38-x86_64-linux-gnu.so
2692 DEBUG: Adding libpng16.so.16 dependency of _tkinter.cpython-38-x86_64-linux-gnu.so from /lib/x86_64-linux-gnu/libpng16.so.16
2692 DEBUG: Adding libXext.so.6 dependency of _tkinter.cpython-38-x86_64-linux-gnu.so from /lib/x86_64-linux-gnu/libXext.so.6
2746 INFO: checking Tree
2746 INFO: Building Tree because Tree-00.toc is non existent
2746 INFO: Building Tree Tree-00.toc
2751 INFO: checking Tree
2752 INFO: Building Tree because Tree-01.toc is non existent
2752 INFO: Building Tree Tree-01.toc
2779 WARNING: Tcl modules directory /usr/share/tcltk/tcl8.6/../tcl8 does not exist.
2780 INFO: Loading module hook 'hook-lib2to3.py' from '/home/riz/.virtualenvs/pyinstaller/lib/python3.8/site-packages/PyInstaller/hooks'...
2780 DEBUG: Collecting data files for lib2to3
2798 DEBUG: collect_data_files - Found files: [('/usr/lib/python3.8/lib2to3/PatternGrammar.txt', 'lib2to3'), ('/usr/lib/python3.8/lib2to3/Grammar.txt', 'lib2to3')]
2798 INFO: Loading module hook 'hook-xml.etree.cElementTree.py' from '/home/riz/.virtualenvs/pyinstaller/lib/python3.8/site-packages/PyInstaller/hooks'...
2799 INFO: Loading module hook 'hook-difflib.py' from '/home/riz/.virtualenvs/pyinstaller/lib/python3.8/site-packages/PyInstaller/hooks'...
2799 INFO: Excluding import of doctest from module difflib
2799 INFO: Loading module hook 'hook-heapq.py' from '/home/riz/.virtualenvs/pyinstaller/lib/python3.8/site-packages/PyInstaller/hooks'...
2800 INFO: Excluding import of doctest from module heapq
2800 INFO: Loading module hook 'hook-sysconfig.py' from '/home/riz/.virtualenvs/pyinstaller/lib/python3.8/site-packages/PyInstaller/hooks'...
2804 INFO: Loading module hook 'hook-xml.py' from '/home/riz/.virtualenvs/pyinstaller/lib/python3.8/site-packages/PyInstaller/hooks'...
2829 INFO: Loading module hook 'hook-multiprocessing.util.py' from '/home/riz/.virtualenvs/pyinstaller/lib/python3.8/site-packages/PyInstaller/hooks'...
2830 INFO: Excluding import of test from module multiprocessing.util
2830 INFO: Excluding import of test.support from module multiprocessing.util
2830 INFO: Loading module hook 'hook-distutils.py' from '/home/riz/.virtualenvs/pyinstaller/lib/python3.8/site-packages/PyInstaller/hooks'...
2830 INFO: Loading module hook 'hook-encodings.py' from '/home/riz/.virtualenvs/pyinstaller/lib/python3.8/site-packages/PyInstaller/hooks'...
2830 DEBUG: Collecting submodules for encodings
2857 DEBUG: collect_submodules - Found submodules: {'encodings.unicode_escape', 'encodings.cp424', 'encodings.ptcp154', 'encodings.cp1255', 'encodings.cp1253', 'encodings.iso8859_2', 'encodings.cp855', 'encodings.cp866', 'encodings.cp1125', 'encodings.raw_unicode_escape', 'encodings.euc_jis_2004', 'encodings.mac_latin2', 'encodings.johab', 'encodings.iso8859_9', 'encodings.mac_farsi', 'encodings.iso8859_13', 'encodings.mac_cyrillic', 'encodings.big5hkscs', 'encodings.cp875', 'encodings.koi8_u', 'encodings.hp_roman8', 'encodings', 'encodings.cp856', 'encodings.iso8859_15', 'encodings.mac_croatian', 'encodings.shift_jis', 'encodings.iso2022_jp', 'encodings.aliases', 'encodings.iso8859_16', 'encodings.mac_turkish', 'encodings.cp437', 'encodings.undefined', 'encodings.cp1252', 'encodings.cp775', 'encodings.cp865', 'encodings.iso8859_1', 'encodings.euc_kr', 'encodings.base64_codec', 'encodings.ascii', 'encodings.mac_roman', 'encodings.oem', 'encodings.cp949', 'encodings.iso8859_6', 'encodings.utf_8', 'encodings.hz', 'encodings.iso8859_14', 'encodings.cp864', 'encodings.iso2022_kr', 'encodings.koi8_t', 'encodings.mac_arabic', 'encodings.quopri_codec', 'encodings.punycode', 'encodings.bz2_codec', 'encodings.rot_13', 'encodings.cp737', 'encodings.zlib_codec', 'encodings.iso8859_4', 'encodings.cp1006', 'encodings.cp273', 'encodings.iso2022_jp_ext', 'encodings.kz1048', 'encodings.cp1256', 'encodings.iso2022_jp_3', 'encodings.koi8_r', 'encodings.mac_centeuro', 'encodings.cp861', 'encodings.cp1257', 'encodings.big5', 'encodings.iso8859_5', 'encodings.utf_16_be', 'encodings.cp1251', 'encodings.cp850', 'encodings.gb2312', 'encodings.iso2022_jp_1', 'encodings.shift_jis_2004', 'encodings.cp500', 'encodings.cp857', 'encodings.utf_32', 'encodings.cp950', 'encodings.charmap', 'encodings.utf_32_le', 'encodings.tis_620', 'encodings.iso8859_11', 'encodings.cp037', 'encodings.mac_romanian', 'encodings.mac_iceland', 'encodings.shift_jisx0213', 'encodings.cp858', 'encodings.idna', 'encodings.cp932', 'encodings.cp874', 'encodings.cp1258', 'encodings.uu_codec', 'encodings.cp862', 'encodings.cp852', 'encodings.cp1254', 'encodings.iso8859_7', 'encodings.latin_1', 'encodings.cp863', 'encodings.iso2022_jp_2', 'encodings.utf_8_sig', 'encodings.utf_7', 'encodings.utf_16', 'encodings.utf_16_le', 'encodings.hex_codec', 'encodings.iso8859_3', 'encodings.mbcs', 'encodings.euc_jisx0213', 'encodings.cp869', 'encodings.cp720', 'encodings.mac_greek', 'encodings.euc_jp', 'encodings.palmos', 'encodings.cp1140', 'encodings.cp1026', 'encodings.cp1250', 'encodings.gbk', 'encodings.utf_32_be', 'encodings.iso2022_jp_2004', 'encodings.gb18030', 'encodings.iso8859_10', 'encodings.cp860', 'encodings.iso8859_8'}
2862 INFO: Loading module hook 'hook-pickle.py' from '/home/riz/.virtualenvs/pyinstaller/lib/python3.8/site-packages/PyInstaller/hooks'...
2864 INFO: Excluding import of argparse from module pickle
2864 INFO: Loading module hook 'hook-distutils.util.py' from '/home/riz/.virtualenvs/pyinstaller/lib/python3.8/site-packages/PyInstaller/hooks'...
2865 INFO: Excluding import of lib2to3.refactor from module distutils.util
2871 DEBUG: Looking for egg data files...
2871 INFO: Looking for ctypes DLLs
2871 DEBUG: Scanning test.support for shared libraries or dlls
2888 DEBUG: Scanning multiprocessing.sharedctypes for shared libraries or dlls
2889 INFO: Analyzing run-time hooks ...
2891 INFO: Including run-time hook '/home/riz/.virtualenvs/pyinstaller/lib/python3.8/site-packages/PyInstaller/hooks/rthooks/pyi_rth_multiprocessing.py'
2895 INFO: Looking for dynamic libraries
2895 DEBUG: Analyzing /usr/lib/python3.8/lib-dynload/_posixshmem.cpython-38-x86_64-linux-gnu.so
2902 DEBUG: Skipping libc.so.6 dependency of _posixshmem.cpython-38-x86_64-linux-gnu.so
2902 DEBUG: Skipping libpthread.so.0 dependency of _posixshmem.cpython-38-x86_64-linux-gnu.so
2902 DEBUG: Skipping librt.so.1 dependency of _posixshmem.cpython-38-x86_64-linux-gnu.so
2902 DEBUG: Analyzing /usr/lib/python3.8/lib-dynload/_multiprocessing.cpython-38-x86_64-linux-gnu.so
2909 DEBUG: Skipping libc.so.6 dependency of _multiprocessing.cpython-38-x86_64-linux-gnu.so
2909 DEBUG: Skipping libpthread.so.0 dependency of _multiprocessing.cpython-38-x86_64-linux-gnu.so
2909 DEBUG: Analyzing /usr/lib/python3.8/lib-dynload/_ssl.cpython-38-x86_64-linux-gnu.so
2914 DEBUG: Skipping libpthread.so.0 dependency of _ssl.cpython-38-x86_64-linux-gnu.so
2914 DEBUG: Skipping libdl.so.2 dependency of _ssl.cpython-38-x86_64-linux-gnu.so
2914 DEBUG: Adding libssl.so.1.1 dependency of _ssl.cpython-38-x86_64-linux-gnu.so from /lib/x86_64-linux-gnu/libssl.so.1.1
2914 DEBUG: Skipping libc.so.6 dependency of _ssl.cpython-38-x86_64-linux-gnu.so
2914 DEBUG: Adding libcrypto.so.1.1 dependency of _ssl.cpython-38-x86_64-linux-gnu.so from /lib/x86_64-linux-gnu/libcrypto.so.1.1
2914 DEBUG: Analyzing /usr/lib/python3.8/lib-dynload/_asyncio.cpython-38-x86_64-linux-gnu.so
2919 DEBUG: Skipping libc.so.6 dependency of _asyncio.cpython-38-x86_64-linux-gnu.so
2920 DEBUG: Analyzing /usr/lib/python3.8/lib-dynload/_contextvars.cpython-38-x86_64-linux-gnu.so
2925 DEBUG: Analyzing /usr/lib/python3.8/lib-dynload/_queue.cpython-38-x86_64-linux-gnu.so
2931 DEBUG: Analyzing /usr/lib/python3.8/lib-dynload/mmap.cpython-38-x86_64-linux-gnu.so
2938 DEBUG: Skipping libc.so.6 dependency of mmap.cpython-38-x86_64-linux-gnu.so
2938 DEBUG: Skipping libpthread.so.0 dependency of mmap.cpython-38-x86_64-linux-gnu.so
2938 DEBUG: Analyzing /usr/lib/python3.8/lib-dynload/termios.cpython-38-x86_64-linux-gnu.so
2944 DEBUG: Skipping libc.so.6 dependency of termios.cpython-38-x86_64-linux-gnu.so
2944 DEBUG: Skipping libpthread.so.0 dependency of termios.cpython-38-x86_64-linux-gnu.so
2944 DEBUG: Analyzing /usr/lib/python3.8/lib-dynload/_decimal.cpython-38-x86_64-linux-gnu.so
2950 DEBUG: Skipping libc.so.6 dependency of _decimal.cpython-38-x86_64-linux-gnu.so
2950 DEBUG: Skipping libpthread.so.0 dependency of _decimal.cpython-38-x86_64-linux-gnu.so
2950 DEBUG: Adding libmpdec.so.2 dependency of _decimal.cpython-38-x86_64-linux-gnu.so from /lib/x86_64-linux-gnu/libmpdec.so.2
2950 DEBUG: Skipping libm.so.6 dependency of _decimal.cpython-38-x86_64-linux-gnu.so
2950 DEBUG: Analyzing /usr/lib/python3.8/lib-dynload/readline.cpython-38-x86_64-linux-gnu.so
2957 DEBUG: Skipping libc.so.6 dependency of readline.cpython-38-x86_64-linux-gnu.so
2957 DEBUG: Adding libreadline.so.8 dependency of readline.cpython-38-x86_64-linux-gnu.so from /lib/x86_64-linux-gnu/libreadline.so.8
2957 DEBUG: Skipping libpthread.so.0 dependency of readline.cpython-38-x86_64-linux-gnu.so
2957 DEBUG: Adding libtinfo.so.6 dependency of readline.cpython-38-x86_64-linux-gnu.so from /lib/x86_64-linux-gnu/libtinfo.so.6
2957 DEBUG: Analyzing /usr/lib/python3.8/lib-dynload/_opcode.cpython-38-x86_64-linux-gnu.so
2963 DEBUG: Analyzing /usr/lib/python3.8/lib-dynload/_hashlib.cpython-38-x86_64-linux-gnu.so
2969 DEBUG: Skipping libc.so.6 dependency of _hashlib.cpython-38-x86_64-linux-gnu.so
2969 DEBUG: Skipping libpthread.so.0 dependency of _hashlib.cpython-38-x86_64-linux-gnu.so
2969 DEBUG: Skipping libdl.so.2 dependency of _hashlib.cpython-38-x86_64-linux-gnu.so
2969 DEBUG: Analyzing /usr/lib/python3.8/lib-dynload/resource.cpython-38-x86_64-linux-gnu.so
2976 DEBUG: Skipping libc.so.6 dependency of resource.cpython-38-x86_64-linux-gnu.so
2976 DEBUG: Skipping libpthread.so.0 dependency of resource.cpython-38-x86_64-linux-gnu.so
2976 DEBUG: Analyzing /usr/lib/python3.8/lib-dynload/_lzma.cpython-38-x86_64-linux-gnu.so
2983 DEBUG: Adding liblzma.so.5 dependency of _lzma.cpython-38-x86_64-linux-gnu.so from /lib/x86_64-linux-gnu/liblzma.so.5
2983 DEBUG: Skipping libc.so.6 dependency of _lzma.cpython-38-x86_64-linux-gnu.so
2983 DEBUG: Skipping libpthread.so.0 dependency of _lzma.cpython-38-x86_64-linux-gnu.so
2983 DEBUG: Analyzing /usr/lib/python3.8/lib-dynload/_bz2.cpython-38-x86_64-linux-gnu.so
2991 DEBUG: Adding libbz2.so.1.0 dependency of _bz2.cpython-38-x86_64-linux-gnu.so from /lib/x86_64-linux-gnu/libbz2.so.1.0
2991 DEBUG: Skipping libc.so.6 dependency of _bz2.cpython-38-x86_64-linux-gnu.so
2991 DEBUG: Analyzing /usr/lib/python3.8/lib-dynload/_ctypes.cpython-38-x86_64-linux-gnu.so
2999 DEBUG: Skipping libc.so.6 dependency of _ctypes.cpython-38-x86_64-linux-gnu.so
2999 DEBUG: Skipping libpthread.so.0 dependency of _ctypes.cpython-38-x86_64-linux-gnu.so
2999 DEBUG: Adding libffi.so.7 dependency of _ctypes.cpython-38-x86_64-linux-gnu.so from /lib/x86_64-linux-gnu/libffi.so.7
2999 DEBUG: Skipping libdl.so.2 dependency of _ctypes.cpython-38-x86_64-linux-gnu.so
2999 DEBUG: Analyzing /usr/lib/python3.8/lib-dynload/_multibytecodec.cpython-38-x86_64-linux-gnu.so
3005 DEBUG: Skipping libc.so.6 dependency of _multibytecodec.cpython-38-x86_64-linux-gnu.so
3005 DEBUG: Analyzing /usr/lib/python3.8/lib-dynload/_codecs_cn.cpython-38-x86_64-linux-gnu.so
3009 DEBUG: Skipping libc.so.6 dependency of _codecs_cn.cpython-38-x86_64-linux-gnu.so
3010 DEBUG: Analyzing /usr/lib/python3.8/lib-dynload/_codecs_iso2022.cpython-38-x86_64-linux-gnu.so
3015 DEBUG: Skipping libc.so.6 dependency of _codecs_iso2022.cpython-38-x86_64-linux-gnu.so
3015 DEBUG: Analyzing /usr/lib/python3.8/lib-dynload/_codecs_jp.cpython-38-x86_64-linux-gnu.so
3022 DEBUG: Skipping libc.so.6 dependency of _codecs_jp.cpython-38-x86_64-linux-gnu.so
3022 DEBUG: Analyzing /usr/lib/python3.8/lib-dynload/_codecs_tw.cpython-38-x86_64-linux-gnu.so
3029 DEBUG: Skipping libc.so.6 dependency of _codecs_tw.cpython-38-x86_64-linux-gnu.so
3029 DEBUG: Analyzing /usr/lib/python3.8/lib-dynload/_codecs_kr.cpython-38-x86_64-linux-gnu.so
3035 DEBUG: Skipping libc.so.6 dependency of _codecs_kr.cpython-38-x86_64-linux-gnu.so
3036 DEBUG: Analyzing /usr/lib/python3.8/lib-dynload/_codecs_hk.cpython-38-x86_64-linux-gnu.so
3042 DEBUG: Skipping libc.so.6 dependency of _codecs_hk.cpython-38-x86_64-linux-gnu.so
3042 DEBUG: Analyzing /lib/x86_64-linux-gnu/libssl.so.1.1
3047 DEBUG: Skipping libc.so.6 dependency of libssl.so.1.1
3047 DEBUG: Skipping libpthread.so.0 dependency of libssl.so.1.1
3047 DEBUG: Skipping libdl.so.2 dependency of libssl.so.1.1
3047 DEBUG: Analyzing /lib/x86_64-linux-gnu/libcrypto.so.1.1
3053 DEBUG: Skipping libc.so.6 dependency of libcrypto.so.1.1
3053 DEBUG: Skipping libpthread.so.0 dependency of libcrypto.so.1.1
3053 DEBUG: Skipping libdl.so.2 dependency of libcrypto.so.1.1
3053 DEBUG: Analyzing /lib/x86_64-linux-gnu/libmpdec.so.2
3060 DEBUG: Skipping libc.so.6 dependency of libmpdec.so.2
3060 DEBUG: Skipping libm.so.6 dependency of libmpdec.so.2
3060 DEBUG: Analyzing /lib/x86_64-linux-gnu/libreadline.so.8
3066 DEBUG: Skipping libc.so.6 dependency of libreadline.so.8
3066 DEBUG: Analyzing /lib/x86_64-linux-gnu/libtinfo.so.6
3073 DEBUG: Skipping libc.so.6 dependency of libtinfo.so.6
3073 DEBUG: Analyzing /lib/x86_64-linux-gnu/liblzma.so.5
3079 DEBUG: Skipping libc.so.6 dependency of liblzma.so.5
3079 DEBUG: Skipping libpthread.so.0 dependency of liblzma.so.5
3079 DEBUG: Analyzing /lib/x86_64-linux-gnu/libbz2.so.1.0
3086 DEBUG: Skipping libc.so.6 dependency of libbz2.so.1.0
3086 DEBUG: Analyzing /lib/x86_64-linux-gnu/libffi.so.7
3093 DEBUG: Skipping libc.so.6 dependency of libffi.so.7
3093 INFO: Looking for eggs
3093 INFO: Python library not in binary dependencies. Doing additional searching...
3118 DEBUG: Adding Python library to binary dependencies
3118 INFO: Using Python library /lib/x86_64-linux-gnu/libpython3.8.so.1.0
3120 INFO: Warnings written to /home/riz/Desktop/vlc/build/testscript/warn-testscript.txt
3133 INFO: Graph cross-reference written to /home/riz/Desktop/vlc/build/testscript/xref-testscript.html
3139 INFO: Graph drawing written to /home/riz/Desktop/vlc/build/testscript/graph-testscript.dot
3142 DEBUG: compiled /usr/lib/python3.8/struct.py
3142 INFO: checking PYZ
3142 INFO: Building PYZ because PYZ-00.toc is non existent
3142 INFO: Building PYZ (ZlibArchive) /home/riz/Desktop/vlc/build/testscript/PYZ-00.pyz
3385 INFO: Building PYZ (ZlibArchive) /home/riz/Desktop/vlc/build/testscript/PYZ-00.pyz completed successfully.
3387 INFO: checking PKG
3387 INFO: Building PKG because PKG-00.toc is non existent
3387 INFO: Building PKG (CArchive) PKG-00.pkg
3416 DEBUG: Compiling /home/riz/.virtualenvs/pyinstaller/lib/python3.8/site-packages/PyInstaller/loader/pyiboot01_bootstrap.py
3416 DEBUG: Compiling /home/riz/.virtualenvs/pyinstaller/lib/python3.8/site-packages/PyInstaller/loader/pyiboot01_bootstrap.py
3417 DEBUG: Compiling /home/riz/.virtualenvs/pyinstaller/lib/python3.8/site-packages/PyInstaller/hooks/rthooks/pyi_rth_multiprocessing.py
3417 DEBUG: Compiling /home/riz/.virtualenvs/pyinstaller/lib/python3.8/site-packages/PyInstaller/hooks/rthooks/pyi_rth_multiprocessing.py
3417 DEBUG: Compiling /home/riz/Desktop/vlc/testscript.py
3417 DEBUG: Compiling /home/riz/Desktop/vlc/testscript.py
3418 DEBUG: Compiling /home/riz/Desktop/vlc/specfile.py
3418 DEBUG: Compiling /home/riz/Desktop/vlc/specfile.py
3420 INFO: Building PKG (CArchive) PKG-00.pkg completed successfully.
3420 INFO: Bootloader /home/riz/.virtualenvs/pyinstaller/lib/python3.8/site-packages/PyInstaller/bootloader/Linux-64bit/run
3420 INFO: checking EXE
3420 INFO: Building EXE because EXE-00.toc is non existent
3420 INFO: Building EXE from EXE-00.toc
3420 INFO: Appending archive to ELF section in EXE /home/riz/Desktop/vlc/build/testscript/testscript
3425 DEBUG: objcopy returned 0
3425 INFO: Building EXE from EXE-00.toc completed successfully.
3426 INFO: checking COLLECT
3426 INFO: Building COLLECT because COLLECT-00.toc is non existent
3426 INFO: Building COLLECT COLLECT-00.toc
3434 INFO: Building COLLECT COLLECT-00.toc completed successfully.
(pyinstaller) riz@riz-desktop:~/Desktop/vlc$ 

@rizsyed1 rizsyed1 closed this as completed Feb 1, 2021
@rickykresslein
Copy link

rickykresslein commented Apr 10, 2021

I am still having this issue in the latest version of pyinstaller run from source downloaded from the repository. Has anyone found a more permanent fix?

Edit: For more context, I'm building my program on Ubuntu 16.04 using python 3.8 and pyinstaller 4.2 (as mentioned, I've also tried the most current source). Everything works fine when I launch the app on that system, but when I move it over to openSUSE Tumbleweed I get

Traceback (most recent call last): File "kodkast.py", line 523, in <lambda> File "kodkast.py", line 731, in build_play_view File "vlc.py", line 3254, in __new__ o = instance.media_player_new() AttributeError: 'NoneType' object has no attribute 'media_player_new'

Edit 2 [Solved]: For anyone else with this issue, I resolved it by installing the latest version of VLC on Ubuntu 16.04 via the PPAs. It does not work to install VLC via snap, it must be installed with the PPAs. Now everything works when I move the binary to my oS Tumbleweed machine.

@thaiiceland
Copy link

thaiiceland commented Oct 28, 2022

After reading the comment from @aclbandit
#4506 (comment)

EDIT 28 okt 2022:
After probable to long time, I have found out a solution...
Get a copy of the vlc.py. You can download it or find it on your Linux System (in my Linux Mint I found it in /home/"YOUR_USER_NAME"/.local/lib/python3.10/site-packages/vlc.py) and paste it in your program folder.
in the beginning of the file (where all imports command are) add import subprocess
Next find the line def find_lib(): (depends on the vlc.py file it is around line 115 - 125. There under for all the platforms , include platform for Linux
Like this:

..
import subprocess
..

def find_lib():
..
    if sys.platform.startswith("win")
..

    elif sys.platform.startswith("linux"):
        myvar=subprocess.check_output("find /usr/lib/ -type f 2>&1 | grep -v 'Permission denied' | grep 'vlc/plugins/plugins.dat'",shell=True)
        plugin_path = myvar.decode('utf-8').replace("vlc/plugins/plugins.dat", "vlc/plugins").replace("\n","")
        #print(plugin_path)
        p = find_library('vlc')
        try:
            dll = ctypes.CDLL(p)
        except OSError:  # may fail
            dll = None
        if dll is None:
            try:
                dll = ctypes.CDLL('libvlc.so.5')
            except:
                raise NotImplementedError('Cannot find libvlc lib')

This seems to work, but only if you install VLC player from the package manager (not the flatpack one). It seems not any problem if both flatpack and the original package one are installed.
I have test this on 2 Linux computers (but both of them are same Linux flavor, Linux Mint), and this seems to work.
I would like to know if someone will try this on other Linux Distro and if this work.

EDIT 27 okt 2022:
I was probable to quickly on this, because after trying to use the program on other Linux system, it did throw error about the path was wrong....... :(
But I think from here I probable can work on this and maybe find the solution...

ORGINAL POST 27 okt 2022:
I was able to figure out how to make my program to work. It did always throw error AttributeError: 'NoneType' object has no attribute 'media_player_new' after using pyinstaller, but there was no problem to running the python file before using the pyinstaller.

My solution was:
Get a copy of the vlc.py. You can download it or find it on your Linux System (in my Linux Mint I found it in /home/"YOUR_USER_NAME"/.local/lib/python3.10/site-packages/vlc.py) and paste it in your program folder.
Find the line def find_lib(): (depends on the vlc.py file it is around line 115 - 125. Change the line
plugin_path = os.environ.get('PYTHON_VLC_MODULE_PATH', None) to
plugin_path = "/usr/lib/x86_64-linux-gnu/vlc/plugins" or where you can find location of the vlc plugin folder (my OS is Linux Mint 21 Cinnamon 64-bit).

Thats it. Now I was able to type in terminal pyinstaller --onefile myPythonApp.py and my file work as I programmed it to work....

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area:hooks Caused by or effecting some hook bug platform:Linux
Projects
None yet
Development

No branches or pull requests

9 participants