0

Just looking a bit into the idea of python and eel - and got somehow a strange behavior by trying around the callbacks and expose'es.

Well - I put out all my code with feedbacks and came back again to the basic level. But the behavior is still there. block=False seems not working and will crash:

import eel
eel.init("view")
eel.start("index_blank.html", block=False)

And my puristic html code:

<!doctype html>
<html lang="en">
  <head>
    <script src="eel.js"></script>
  </head>

  <body>
    <h1>Hello, world!</h1>
  </body>
</html>

It gives me a 404 error.

But when I start eel with this basic pattern:

eel.start("index_blank.html")

it will work. When I use block=False it wont't:

eel.start("index_blank.html", block=False)

Any idea?

Yes... I know. I kicked out all my callbacks out of this code and came back to this very basic pattern. Just to get the idea what's wrong. I know that I do not need block=False here - but at the end of the day I want draw back something on the html-code.

python3. pip3.

robmeg
  • 1
  • Just spitballing here, as I've never used eel, but none of your other threads are actually executing anything here, so there's nothing to "not block". Maybe try spawning another thread, or doing more work on the Python main thread after calling `eel.start`, like this [example](https://github.com/ChrisKnott/Eel#asynchronous-python) does. – iced Sep 01 '22 at 16:14
  • You're absolutely right! Now I got the point of "block=False". It does not end up or crash, it simply runs through and end up the script like "block=False" promise. – robmeg Sep 02 '22 at 08:48
  • Yes, seems like a bit of unexpected behavior though to break the eel web thread if the calling thread isn't executing anything. I imagine it must just terminate before the eel thread ever renders the page. – iced Sep 02 '22 at 13:17

0 Answers0