python-eel / Eel

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

Localhost refused to connect #537

Closed draptorhub closed 2 years ago

draptorhub commented 2 years ago

Hello, eel community, I created two projects say project A and project B. I created an executable file for both projects. The executable file of project A is working fine but the executable file of project B is not doing fine. it says localhost refused to connect. Can you please help me asap? Tomorrow I need to submit to my client otherwise I am doomed. project A - GitHub ===> https://github.com/AnirudhKumaran/wordfeeder project B - GitHub ===> https://github.com/draptorhub/eniwas-desktop I would be really grateful for your help.

draptorhub commented 2 years ago

image and this what is happening when i run my executable file.

draptorhub commented 2 years ago

image

ChrisKnott commented 2 years ago

I think probably what's happening is... the default behaviour is to make use of Port 8000. So, I think both apps are trying to make use of it and the second one can't.

You can change the behaviour by adding port=0 to the eel.start() command. Port 0 isn't a real port, it means "try and find any open port".

draptorhub commented 2 years ago

image the above image is while i run the main.exe file my localhost and port is not getting started. but where as i run my python main.py file in my venv its doing good and below is the output. image

draptorhub commented 2 years ago

No your solution didn't work, when i gave port = 0 in venv its working but in .exe it is not working

draptorhub commented 2 years ago

hey would you mind joining the google meet : https://meet.google.com/gvw-fijj-oyg pleaseee!

draptorhub commented 2 years ago

Hey, thank you so much for the help it's doing fine now. I deployed the code on some other laptop and made an executable version it is doing fine. But the default 8000 behaviour is still happening on my laptop. But anyway thank you so much for your help. And I really love eel very much. A sincere thanks to this team and community for this wonderful contribution.