question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Question]: After using Pyinstaller to package the program as an EXE file, the runtime error reported that the offender was wrong

See original GitHub issue

Your question

After using Pyinstall to package the program as an EXE file, the runtime error reported that the offender was wrong.

Traceback (most recent call last):
  File "main.py", line 73, in <module>
  File "typer\main.py", line 214, in __call__
  File "click\core.py", line 829, in __call__
  File "click\core.py", line 782, in main
  File "click\core.py", line 1259, in invoke
  File "click\core.py", line 1066, in invoke
  File "click\core.py", line 610, in invoke
  File "typer\main.py", line 497, in wrapper
  File "main.py", line 64, in run_shift_excel
  File "asyncio\runners.py", line 44, in run
  File "asyncio\base_events.py", line 616, in run_until_complete
  File "main.py", line 31, in shift_excel
  File "playwright\async_api\_context_manager.py", line 47, in __aenter__
  File "playwright\_impl\_transport.py", line 108, in run
  File "asyncio\subprocess.py", line 236, in create_subprocess_exec
  File "asyncio\base_events.py", line 1630, in subprocess_exec
  File "asyncio\windows_events.py", line 389, in _make_subprocess_transport
  File "asyncio\base_subprocess.py", line 36, in __init__
  File "asyncio\windows_events.py", line 885, in _start
  File "asyncio\windows_utils.py", line 153, in __init__
  File "subprocess.py", line 858, in __init__
  File "subprocess.py", line 1311, in _execute_child
FileNotFoundError: [WinError 2] 

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
mxschmittcommented, Jul 29, 2021

Playwright does not use ChromeDriver. It uses normal Chromium which gets installed via playwright install. See here for the docs for Pyinstaller which you should be able to use when you install it via Git.

https://playwright.dev/python/docs/next/intro#pyinstaller

pip install git+https://github.com/microsoft/playwright-python
PLAYWRIGHT_BROWSERS_PATH=0 playwright install chromium
pyinstaller -F test.py
./dist/test
1reaction
mxschmittcommented, Jul 29, 2021

Pyinstaller support is not yet available, please wait until 1.13.1 was released.

Read more comments on GitHub >

github_iconTop Results From Across the Web

When Things Go Wrong — PyInstaller 5.7.0 documentation
When the Analysis step runs, it produces error and warning messages. ... produced when a class or function is declared in a package...
Read more >
Runtime error when calling a .exe made with PyInstaller ...
The command: pyinstaller my_script.py runs fine without any errors. The problem occurs when I run the .exe file. Error: Qt: Untested Windows ......
Read more >
Problems with Pyinstaller & and Common Fixes - YouTube
uite error prone, and many people have run into alot of constant errors and problems while using Pyinstaller. This Video was created for...
Read more >
Pyinstaller: Module not found when running .exe when ...
The program tries to write a Pandas dataframe. This works find in PyCharm, but when I produce a Windows exe using PyInstaller it...
Read more >
Easy Steps to Create an Executable in Python Using PyInstaller
Guide to create a Python executable file using PyInstaller. ... and in that case, when you run the executable, you will get an...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found