python-eel/Eel

browser pops up before server is properly initialized

Open

#561 建立於 2022年1月19日

在 GitHub 查看
 (3 留言) (0 反應) (0 負責人)Python (570 fork)batch import
help wanted

倉庫指標

Star
 (5,980 star)
PR 合併指標
 (30 天內沒有已合併 PR)

描述

I'm attempting to get a currently existing eel project to work on RHEL 8. I'm using python3.8 to run the GUI, and just installed eel via pip. When I start the program, it pops open a browser that gives an error that it cannot connect to the server. If I wait a couple seconds, I can refresh the page and the program works as expected from there.

As for a code snippet, I'm not entirely sure where the relevant parts would be, so here's where I initialize and launch the program. If you can point me in a better direction, I'd love to hear it.

# I promise I have the relevant imports...
if __name__ == '__main__':
    multiprocessing.freeze_support()
    print(eel._get_real_path('GUI/web'))
    eel.init('GUI/web')
    eel.start('main.html', size=(1366, 780), port=9999, cmdline_args=['--allow-file-access-from-files', os.getcwd()], mode='default')

Desktop:

  • OS: RHEL8
  • Browser: firefox
  • Version: 91.5.0esr

貢獻者指南