Eel: Error: 404 Not Found
Hey ya, I know this issue has probably been dealt with before, however I can’t find any proper workarounds to it.
I am getting this message: `Error: 404 Not Found Sorry, the requested URL ‘http://localhost:8000/main.html’ caused an error:
File does not exist.`
Everytime I run a test eel project. First I had issues with Python displaying a osError because some other program was using port 8000. After I killed that task to leave that port free for eel, it only showed me the message you can see above.
Here’s the code:
eeltest.py `import eel
eel.init(‘web’) eel.start(‘main.html’)`
main.html
<p>Hola</p>
Any help will be very appreciated in advance.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 22
I already had have the same problem and i was be able to solved. The way i’ve solved is just change the line:
eel.init('web')
to the absolute path, like
eel.init('C:/.../web')
where my web folder isI hope that helps!
import eel import os
Set web files folder
eel.init(f’{os.path.dirname(os.path.realpath(file))}/web’)
I found out the solution, kill all the processes running on that port. I didn’t get any error because it crashed on startup.
Anyone who is stuck here, the fix is:
fuser -k [port_name]/tcp
.This is not related to the cache as mentioned above, I tried clearing the cache as well keeping the cache.
I have found solution to this particular problem : ) - just do two things first make sure that your main html file name is index.html and other is that the file must exist in the specific location where you have specified in
eel.init("foldername")
function (☞゚ヮ゚)☞ and the problem is solvedLet me see, the issue here is that probably you forgot to create the folder “web” inside your Eel project. wasn’t it this?