You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 22, 2025. It is now read-only.
Repository navigation
This repository was archived by the owner on Jun 22, 2025. It is now read-only.
Hello, I've built an app with eel and now I'm trying to make an executable from it. But if I try to disable the console it doesn't start and shows the following error:
I'm using this command: python -m eel app.py web --onefile --noconsole --splash splash.png
and from python I just runeel.start('index.html')
I tried to redirect sys.stderr and sys.stdout to a StringIO or a PIPE but still the error popup.
I'm on windows and the app runs with Chrome.
@francescofact @lucasadsouza We faced same problem on project. This soulution is not maybe for everyone but as a workaround will help you. Attempt to redirect sys.stderr and sys.stdout somewhere was right way but only redirect to /dev/null works for us.
Version: eel v0.15.0 with electron
Cmd: python -m eel main.py web --noconsole --onefile
import os
import sys
f = open(os.devnull, 'w')
sys.stdout = f
sys.stderr = f
import eel
Activity
lucdsouza commentedon Dec 19, 2022
Same here, trying to find a solution or workaround, but no lucky until now... let me know if you find something, please
snopedom commentedon Dec 19, 2022
@francescofact @lucasadsouza We faced same problem on project. This soulution is not maybe for everyone but as a workaround will help you. Attempt to redirect
sys.stderrandsys.stdoutsomewhere was right way but only redirect to/dev/nullworks for us.Version:
eel v0.15.0 with electronCmd:
python -m eel main.py web --noconsole --onefilefrancescofact commentedon Dec 19, 2022
Thank you. I also figure out a similar temporary solution.
Put this snippet at the very top of the code, also Upper then libraries
JeswinSunsi commentedon Jan 12, 2023
@francescofact @snopedom @lucasadsouza Here's another solution that I used for a project a couple years back. It's working as of November 2022.
woodrow-lwd commentedon Jan 29, 2023
it's work for me. just need to write this code snippet before
import eeldoug-benn commentedon Feb 9, 2023
Hello,
This is odd because I am using a chrome-app binary created with --noconsole --onefile.
Works fine for chrome but not edge which I fixed here: #626
Thanks
davis-andy commentedon Mar 15, 2023
I ran into this issue as well and it might be a bottle issue since the screenshot shows from file bottle.py line 73, which shows this:
using --noconsole causes an AttributeError (probably because the console does not exist so there is nothing to write to)
I sort of did this in my bottle files before running pyinstaller, which may not be the best solution but was a temp fix that worked for me:
Not sure what can really be done for it
IshuSinghSE commentedon Jul 17, 2024
Thanks for the workaround, You're surely a Hacker 🧑💻😁
bwoodsend commentedon Jul 28, 2024
The correct fix is just to check that
sys.stdout/sys.stderraren'tNonebefore attempting to use them.This is in both Python and PyInstaller's documentation.