Error: 404 Not Found Sorry, the requested URL 'http://localhost:8000/main.html' caused an error: File does not exist

Solution 1:

I already had have the same problem and I was be able to solve. The way I've solved is just change the line:

eel.init('web')

so that it uses the absolute path, like

eel.init('C:/.../web') where 'C:/.../web' is the current location of my web folder

If you want to search more about it I recommend this post: https://github.com/samuelhwilliams/Eel/issues/168 but change the path works to me

Solution 2:

Just faced this issue and I' ve used this to solve in a more generic way:

import os

eel.init(f'{os.path.dirname(os.path.realpath(__file__))}/web')