python-eel/Eel

[BUG] problem using --noconsole flag

Aperta

#698 aperta il 20 ago 2023

 (3 commenti) (0 reazioni) (0 assegnatari)Python (570 fork)batch import
help wanted

Metriche repository

Star
 (5980 stelle)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

Describe the problem I'm having problems whenever I use the --noconsole flag. When I create the executable just using --onefile everything works correctly, however, the terminal opens every time I run the .exe executable (which is a problem). I hope you can help me with this problem, I'll leave the image of the error that occurs whenever I have to run the executable created with the --noconsole flag.

  • OS: windows 11
  • Browser chrome

image

UPDATE 1: I created a simple project from scratch with just the eel library, a single python file and a simple html file and when using --noconsole the same problem I described in the image above occurred, which leads me to believe that it is an error in the Library. I need urgent help, because I bet all the development of my project on this library. Thank you for any help.

UPDATE 2: I managed to work around the problem but not solve it. I used the following:

import os
import sys

f = open(os.devnull, 'w')
sys.stdout = f
sys.stderr = f

Guida contributor