Closed hi-Nobody closed 3 years ago
eel.start
should only be called once. In your Python home
function you're trying to call it for a second time, which wants to start up a second eel webserver.
You instead need to call a JavaScript function that performs the navigation. For example, if you eel.expose
a JavaScript function like this:
eel.expose(go_to)
function go_to(url) {window.location.replace(url);};
Then you could update the Python home
functions' eel.start
call with something like eel.go_to('/home')
.
I'm going to close this as it should be enough to fix your issue. Hope it helps!
Hi, I have two problems. First, it is about redirecting to another page after authenticating on login page. I have found solution like this on the web, but it still can't work for me. I always get the error:
OSError: [WinError 10048] Only one usage of each socket address (protocol/network address/port) is normally permitted
Second, why do I can't redirecting using js. If i change
await eel.sign_in(myAccount.value, myPwd.value)();
toor
window.location.replace(redirectUrl);
The following is my code. PYTHON:
sign_in.html:
sign_in.js:
Could you help me, please Thank you.