MicroProger
@MicroProger
Работает - не трогай

Pyinstaller конфличит с yt-dlp. Что не так и как починить?

Вoт ошибка:

Traceback (most recent call last):
  File "C:\Users\gogov\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Users\gogov\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "C:\Users\gogov\AppData\Local\Programs\Python\Python310\Scripts\pyinstaller.exe\__main__.py", line 7, in <module>
  File "C:\Users\gogov\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\__main__.py", line 194, in _console_script_run
    run()
  File "C:\Users\gogov\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\__main__.py", line 180, in run
    run_build(pyi_config, spec_file, **vars(args))
  File "C:\Users\gogov\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\__main__.py", line 61, in run_build
    PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
  File "C:\Users\gogov\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\building\build_main.py", line 1006, in main
    build(specfile, distpath, workpath, clean_build)
  File "C:\Users\gogov\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\building\build_main.py", line 928, in build
    exec(code, spec_namespace)
  File "F:\projectpython\BotDJ\code.spec", line 7, in <module>
    a = Analysis(
  File "C:\Users\gogov\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\building\build_main.py", line 428, in __init__
    self.__postinit__()
  File "C:\Users\gogov\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\building\datastruct.py", line 184, in __postinit__
    self.assemble()
  File "C:\Users\gogov\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\building\build_main.py", line 581, in assemble
    priority_scripts.append(self.graph.add_script(script))
  File "C:\Users\gogov\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\depend\analysis.py", line 268, in add_script
    self._top_script_node = super().add_script(pathname)
  File "C:\Users\gogov\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1433, in add_script
    self._process_imports(n)
  File "C:\Users\gogov\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2881, in _process_imports
    target_modules = self._safe_import_hook(*import_info, **kwargs)
  File "C:\Users\gogov\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\depend\analysis.py", line 432, in _safe_import_hook
    return super()._safe_import_hook(target_module_partname, source_module, target_attr_names, level, edge_attr)
  File "C:\Users\gogov\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2332, in _safe_import_hook
    target_modules = self.import_hook(
  File "C:\Users\gogov\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1505, in import_hook
    target_package, target_module_partname = self._find_head_package(
  File "C:\Users\gogov\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1684, in _find_head_package
    target_package = self._safe_import_module(
  File "C:\Users\gogov\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\depend\analysis.py", line 479, in _safe_import_module
    return super()._safe_import_module(module_basename, module_name, parent_package)
  File "C:\Users\gogov\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2062, in _safe_import_module
    self._process_imports(n)
  File "C:\Users\gogov\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2881, in _process_imports
    target_modules = self._safe_import_hook(*import_info, **kwargs)
  File "C:\Users\gogov\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\depend\analysis.py", line 432, in _safe_import_hook
    return super()._safe_import_hook(target_module_partname, source_module, target_attr_names, level, edge_attr)
  File "C:\Users\gogov\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2332, in _safe_import_hook
    target_modules = self.import_hook(
  File "C:\Users\gogov\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1505, in import_hook
    target_package, target_module_partname = self._find_head_package(
  File "C:\Users\gogov\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1684, in _find_head_package
    target_package = self._safe_import_module(
  File "C:\Users\gogov\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\depend\analysis.py", line 479, in _safe_import_module
    return super()._safe_import_module(module_basename, module_name, parent_package)
  File "C:\Users\gogov\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2061, in _safe_import_module
    n = self._scan_code(module, co, co_ast)
  File "C:\Users\gogov\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2676, in _scan_code
    self._scan_bytecode(
  File "C:\Users\gogov\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2780, in _scan_bytecode
    for inst in util.iterate_instructions(module_code_object):
  File "C:\Users\gogov\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\util.py", line 149, in iterate_instructions
    yield from iterate_instructions(constant)
  File "C:\Users\gogov\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\util.py", line 141, in iterate_instructions
    yield from (i for i in get_instructions(code_object) if i.opname != "EXTENDED_ARG")
  File "C:\Users\gogov\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\util.py", line 141, in <genexpr>
    yield from (i for i in get_instructions(code_object) if i.opname != "EXTENDED_ARG")
  File "C:\Users\gogov\AppData\Local\Programs\Python\Python310\lib\dis.py", line 338, in _get_instructions_bytes
    argval, argrepr = _get_const_info(arg, constants)
  File "C:\Users\gogov\AppData\Local\Programs\Python\Python310\lib\dis.py", line 292, in _get_const_info
    argval = const_list[const_index]
IndexError: tuple index out of range


Как я выявил ошибку? Я удалял модули из скрипта и запускал pyinstaller. Все сломалось на yt-dlp. Подскажите пожалуйста, как это дело можно починить?
  • Вопрос задан
  • 76 просмотров
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы