Задать вопрос
@sharkyyy3

Как упаковать playwright при сборке pyinstaller`ом?

windows 10 x64
python 3.8.1
pyinstaller 4.0
playwright 0.152.0

Код:
from playwright import sync_playwright
playwright = None
def get_playwright():
    if playwright == None:
        try:
            playwright = sync_playwright().start()
            print(playwright)
        except Exception as e:
            raise e
    return playwright

get_playwright()

Упаковываю командой
pyinstaller -F main.py

Traceback при запуске:
Traceback (most recent call last): 
   File "main.py", line 19, in get_playwright 
   File "playwright\__init__.py", line 34, in sync_playwright 
   File "playwright\main.py", line 81, in __init__ 
   File "playwright\main.py", line 76, in run_driver 
   File "asyncio\base_events.py", line 612, in run_until_complete 
   File "playwright\main.py", line 44, in run_driver_async 
   File "playwright\main.py", line 36, in compute_driver_executable 
   File "playwright\path_utils.py", line 23, in get_file_dirname 
AssertionError
[12388] Failed to execute script main


Собственно если не упаковывать ошибки нет:


Как упаковать playwright при сборке pyinstaller`ом?
  • Вопрос задан
  • 216 просмотров
Подписаться 1 Простой 1 комментарий
Пригласить эксперта
Ваш ответ на вопрос

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

Похожие вопросы