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

Compile to Exe not working #342

Closed asdat3 closed 4 years ago

asdat3 commented 4 years ago

Eel version Please state the version of Eel you're using. 0.11.0

Describe the bug When I compile my Scipt to an Exe, I am getting an Error: "eel.js not found" I am getting the error when I am trying to launch the Exe/packaged app I am packing via auto-py-to-exe (master) (pyinstaller) blabla

Imports in Python Script import typing, datetime, discord, os, time, eel from discord.ext import commands, tasks from selenium import webdriver from webdriver_manager.chrome import ChromeDriverManager from selenium.webdriver.common.keys import Keys

OS OS: Windows Python ver: 3.7.8

samuelhwilliams commented 4 years ago

Can you include the command you're running to package the script please?

Do you get this error when you're packaging or when you're executing the packaged app?

When packaging an Eel app you need to include some of the core Eel files. If you package the app using Eel directly, this is handled for you.

To package your app, run something like python -m eel main.py web - assuming your Python file is called main.py and your web/HTML directory is called web.

asdat3 commented 4 years ago

python -m eel main.py web is printing a success, starting the exe isnt working(doesnt show anything) and I get a war-license_client.txt with loads of modules that are missing

asdat3 commented 4 years ago

https://github.com/samuelhwilliams/Eel/issues/255#issuecomment-597466170 I guess it´s the same issue and he could fix it with this solution, but I dont know what he means with: "refer to eel's readme" and how to do that

just an Idea

samuelhwilliams commented 4 years ago

There's a section about how to package Eel apps using pyinstaller here: https://github.com/samuelhwilliams/Eel#building-distributable-binary-with-pyinstaller.

It's titled "Building distributable binary with PyInstaller"

samuelhwilliams commented 4 years ago

I think the problem probably stems from using auto-py-to-exe. I haven't used that personally - but it might be missing some of the options that are needed which the above guide directs you to use.

asdat3 commented 4 years ago

I dont get step 5 sorry

samuelhwilliams commented 4 years ago

You might want to read up on the PyInstaller docs here: http://pyinstaller.readthedocs.io/en/stable/

I'm sorry this is difficult at the moment. We've added a hook to PyInstaller that should make it easier to package Eel in the future, but we're waiting for them to release a newer version that includes our changes.

asdat3 commented 4 years ago

There is nothing about excluding there I still don´t get how to do it

RahulBadenkal commented 4 years ago

Jus to check, can you go to your exe folder and see if there is an eel folder present with a file called eel.js? image

asdat3 commented 4 years ago

no there is no folder

asdat3 commented 4 years ago

blabla2

RahulBadenkal commented 4 years ago

Try copying the folder manually (I think it is in site packages/eel or something) to this directory and run the exe again to see if it works. Also I copy the web folder if it's not already there

asdat3 commented 4 years ago

sdasdasawdawdasdawdaw is this the content of your eel folder too?

asdat3 commented 4 years ago

error is still there(eel.js not found)

asdat3 commented 4 years ago

My output folder: (program is named "license_client") asdfiujdsfiusdfuiuhifuhief

I am using -in one file since when I am using -in one directory and I try to open up the Exe, nothing happens at all

RahulBadenkal commented 4 years ago

Can you copy the eel folder inside licence client folder.

asdat3 commented 4 years ago

guess its working now... testing <3

asdat3 commented 4 years ago

OMG, it is working, thank you both so much <3 I wish you a wonderful day