python-eel / Eel

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

Blocking False is not working #477

Open theRealProHacker opened 3 years ago

theRealProHacker commented 3 years ago

Eel version 0.14.0

Describe the bug When I use the eel.start("index.html", blocking=False) statement then the browser opens with the index.html document and everything is right, but the server isn't responding anymore (reload doesn't work or takes really long time) and the browser console tells me Uncaught SyntaxError: Unexpected identifier at index.html:1 sometimes it might also be at VMnn:1 (n: some digits) even though this error never comes under other circumstances. The error also sometimes leads to the JavaScript not loading.

To Reproduce Steps to reproduce the behavior:

  1. Open up python and call the eel.init("web") function
  2. Then call the eel.start("index.html", blocking=false)
  3. Click on reload (F5) or open the browser console
  4. See error

Expected behavior There shouldn't be an error in the browser console, the JS should be loading and also I should be able to reload the page in decent time

Screenshots Screenshot 1

Desktop (please complete the following information):

ChrisKnott commented 3 years ago

It's difficult to know without seeing your code. If you use blocking=False then you need to implement your own method for stopping the Python script from running to the end and quitting.