python-eel / Eel

A little Python library for making simple Electron-like HTML/JS GUI apps
MIT License
6.47k stars 590 forks source link

Server cannot be started in a non-blocking manner #494

Closed ln-ymk closed 3 years ago

ln-ymk commented 3 years ago

Eel version 0.14.0

Describe the bug When starting an Eel server using threading, multiprocessing or block=False it does not start

To Reproduce Steps to reproduce the behavior:

  1. Start the server in any of the non-blocking manners mentioned.
  2. Visit http://localhost:8000/, only to see the "connection refused" tab.

Expected behavior Server should start in a non-blocking manner.

Desktop (please complete the following information):

Additional context When starting the server in a blocking manner, that is using eel.start("page.html"), the server works as intended. I don't know if there's a problem with it being started like I mentioned, but this is a major roadblock if I want to, say, display the GUI using a module like pywebview.

ln-ymk commented 3 years ago

Nevermind, using a function to call eel.start("page.html") breaks it, while using server = Process(target=eel.start, args=["page.html"], ...); server.start() doesn't.