python-eel / Eel

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

Doesnt load all resources of a sapper static app #385

Closed pramod-thaz closed 4 years ago

pramod-thaz commented 4 years ago

Problem I have been building and testing a Sapper (Svelte) app to serve static files which I can load via Eel. The app is working fine except for a specific situation. Please consider these two cases below. Case 1 works, but Case 2 doesn't; the latter case is important for my app to function in Eel as required for eel.start.

Is it possible to start eel by browsing to the root folder as in Case 1, as opposed to giving a specific start file? Many thanks for your help.

Case 1: WORKS 1

Case 2: DOES NOT WORK 2

samuelhwilliams commented 4 years ago

Can you use default_path='' in eel.start? Not in a place to test this right now but I think it should work. 🤔

pramod-thaz commented 4 years ago

Can you use default_path='' in eel.start? Not in a place to test this right now but I think it should work. 🤔

Thanks @samuelhwilliams . I tried the following - unfortunately, it didn't work. a. eel.start(default_path='', mode="chrome")-- no window was launched b.eel.start('index.html', default_path='/', mode="chrome") -- did not work c. eel.start('/', default_path='/', mode="chrome") -- 403 forbidden error for 'http://localhost:8000/' [ path is correct] d. with eel/bottle server running from c above, browsed to above path ''http://localhost:8000/' - it works