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
*Describe the problem
I am trying to start an Eel window then run the rest of main.py. Since eel.start() blocks the program, I used threading to run it separately.
This works exactly how I want it to, except for a strange error.
Whenever I run main.py, I get "AttributeError: module 'eel' has no attribute 'reload'"
However, in VSCode, if I open the tab that contains index.html (without changing anything), then run main.py again, the program works perfectly.
Code snippet(s)
Here is some code that can be easily used to reproduce the problem or understand what I need help with.
`#guiLaunch.py
import eel
def Init():
eel.init('utils')
def OpenWeb():
eel.start('index.html')
def Reload():
eel.reload()`
`#utils/index.html
<script type="text/javascript">
eel.expose(reload);
function reload() {
window.location.reload();
}
</script>`
#in while loop roughly every 5 seconds:
eel.reload()`
I read through the documentation and saw the recommendation of eel.start('index.html', block=False) and eel.spawn(), but this caused the site that was opened to not be found.
Desktop
OS: Windows
Browser Chrome
Version Chrome 117.0.5938.132
The text was updated successfully, but these errors were encountered:
*Describe the problem
I am trying to start an Eel window then run the rest of main.py. Since eel.start() blocks the program, I used threading to run it separately.
This works exactly how I want it to, except for a strange error.
Whenever I run main.py, I get "AttributeError: module 'eel' has no attribute 'reload'"
However, in VSCode, if I open the tab that contains index.html (without changing anything), then run main.py again, the program works perfectly.
Code snippet(s)
Here is some code that can be easily used to reproduce the problem or understand what I need help with.
`#guiLaunch.py
import eel
def Init():
eel.init('utils')
def OpenWeb():
eel.start('index.html')
def Reload():
eel.reload()`
`#utils/index.html
<script type="text/javascript"> eel.expose(reload); function reload() { window.location.reload(); } </script>``#main.py
import threading
import guiLaunch
guiLaunch.Init()
t1 = threading.Thread(target=guiLaunch.OpenWeb())
t1.start()
#in while loop roughly every 5 seconds:
eel.reload()`
I read through the documentation and saw the recommendation of eel.start('index.html', block=False) and eel.spawn(), but this caused the site that was opened to not be found.
Desktop
The text was updated successfully, but these errors were encountered: