Git Product home page Git Product logo

eel's People

Contributors

aaknitt avatar aaronsantiago avatar ahopkins avatar andriyor avatar bastula avatar chrisknott avatar dependabot[bot] avatar doug-benn avatar dstricks avatar hargonix avatar hassium-269 avatar jallman112 avatar jgobeil avatar kbenzie avatar krpatter-intc avatar kyleking avatar matejc avatar michaelcurrin avatar mo0haned avatar mohamad1994hd avatar nuno-andre avatar ringarch avatar samuelhwilliams avatar saroad2 avatar secang0 avatar shylcok avatar tarehart avatar timgates42 avatar toshism avatar trigaten avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

eel's Issues

Fails to create installer from Hello World example

I have installed eel and pyinstaller (among a lot of other things) in an Anaconda environment. I ran your Hello World example 1, and it worked. Then I tried to build a binary from it, but it failed. I've included the output from pip list if needed. piplist.txt

Do these error messages mean anything to you?

(trademgr2) C:\projects\trademgr2\examples\01 - hello_world>python hello.py
Hello from Python World!
Hello from Javascript World!

(trademgr2) C:\projects\trademgr2\examples\01 - hello_world>python -m eel hello.py web
Building executable with main script 'hello.py' and web folder 'web'...

Running:
pyinstaller hello.py --hidden-import bottle_websocket --add-data C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\eel\eel.js;eel --add-data web;web

292 INFO: PyInstaller: 3.4
292 INFO: Python: 3.6.3
294 INFO: Platform: Windows-10-10.0.17134-SP0
312 INFO: wrote C:\projects\trademgr2\examples\01 - hello_world\hello.spec
342 INFO: UPX is not available.
349 INFO: Extending PYTHONPATH with paths
['C:\projects\trademgr2\examples\01 - hello_world',
'C:\projects\trademgr2\examples\01 - hello_world']
356 INFO: checking Analysis
360 INFO: Building Analysis because Analysis-00.toc is non existent
360 INFO: Initializing module dependency graph...
375 INFO: Initializing module graph hooks...
377 INFO: Analyzing base_library.zip ...
Traceback (most recent call last):
File "", line 41, in
File "", line 13, in walk_packages
File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\pkgutil.py", line 127, in iter_modules
for name, ispkg in iter_importer_modules(i, prefix):
File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\pkgutil.py", line 146, in _iter_file_finder_modules
import inspect
File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\inspect.py", line 41, in
import linecache
File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\linecache.py", line 11, in
import tokenize
File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\tokenize.py", line 33, in
import re
File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\re.py", line 142, in
class RegexFlag(enum.IntFlag):
AttributeError: module 'enum' has no attribute 'IntFlag'
Traceback (most recent call last):
File "", line 41, in
File "", line 13, in walk_packages
File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\pkgutil.py", line 127, in iter_modules
for name, ispkg in iter_importer_modules(i, prefix):
File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\pkgutil.py", line 146, in _iter_file_finder_modules
import inspect
File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\inspect.py", line 41, in
import linecache
File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\linecache.py", line 11, in
import tokenize
File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\tokenize.py", line 33, in
import re
File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\re.py", line 142, in
class RegexFlag(enum.IntFlag):
AttributeError: module 'enum' has no attribute 'IntFlag'
4158 INFO: Analyzing hidden import 'bottle_websocket'
4664 INFO: Processing pre-find module path hook distutils
7015 INFO: Processing pre-safe import module hook six.moves
7636 INFO: running Analysis Analysis-00.toc
7657 INFO: Adding Microsoft.Windows.Common-Controls to dependent assemblies of final executable
required by C:\Users\lee\Anaconda3\envs\trademgr2\python.exe
8223 INFO: Caching module hooks...
8228 INFO: Analyzing C:\projects\trademgr2\examples\01 - hello_world\hello.py
8302 INFO: Loading module hooks...
8302 INFO: Loading module hook "hook-certifi.py"...
8306 INFO: Loading module hook "hook-distutils.py"...
8316 INFO: Loading module hook "hook-encodings.py"...
Traceback (most recent call last):
File "", line 41, in
File "", line 13, in walk_packages
File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\pkgutil.py", line 127, in iter_modules
for name, ispkg in iter_importer_modules(i, prefix):
File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\pkgutil.py", line 146, in iter_file_finder_modules
import inspect
File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\inspect.py", line 41, in
import linecache
File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\linecache.py", line 11, in
import tokenize
File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\tokenize.py", line 33, in
import re
File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\re.py", line 142, in
class RegexFlag(enum.IntFlag):
AttributeError: module 'enum' has no attribute 'IntFlag'
8478 INFO: Loading module hook "hook-gevent.py"...
Traceback (most recent call last):
File "", line 41, in
File "", line 13, in walk_packages
File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\pkgutil.py", line 127, in iter_modules
for name, ispkg in iter_importer_modules(i, prefix):
File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\pkgutil.py", line 146, in iter_file_finder_modules
import inspect
File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\inspect.py", line 41, in
import linecache
File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\linecache.py", line 11, in
import tokenize
File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\tokenize.py", line 33, in
import re
File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\re.py", line 142, in
class RegexFlag(enum.IntFlag):
AttributeError: module 'enum' has no attribute 'IntFlag'
8651 INFO: Determining a mapping of distributions to packages...
40840 WARNING: Unable to find package for requirement greenlet from package gevent.
40840 INFO: Packages required by gevent:
['cffi']
41963 INFO: Processing pre-safe import module hook setuptools.extern.six.moves
Traceback (most recent call last):
File "", line 2, in
File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\setuptools_init
.py", line 6, in
import distutils.core
File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\distutils\core.py", line 16, in
from distutils.dist import Distribution
File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\distutils\dist.py", line 9, in
import re
File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\re.py", line 142, in
class RegexFlag(enum.IntFlag):
AttributeError: module 'enum' has no attribute 'IntFlag'
Traceback (most recent call last):
File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\runpy.py", line 193, in run_module_as_main
"main", mod_spec)
File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\eel_main
.py", line 24, in
pyi.run(full_args)
File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller_main
.py", line 111, in run
run_build(pyi_config, spec_file, **vars(args))
File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller_main.py", line 63, in run_build
PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\building\build_main.py", line 838, in main
build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'))
File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\building\build_main.py", line 784, in build
exec(text, spec_namespace)
File "", line 17, in
File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\building\build_main.py", line 241, in init
self.postinit()
File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\building\datastruct.py", line 158, in postinit
self.assemble()
File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\building\build_main.py", line 500, in assemble
module_hook.post_graph()
File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\building\imphook.py", line 417, in post_graph
self._process_hidden_imports()
File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\building\imphook.py", line 469, in _process_hidden_imports
self.module_graph.import_hook(import_module_name, caller)
File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1421, in import_hook
source_package, target_module_partname, level)
File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1573, in _find_head_package
target_module_headname, target_package_name, source_package)
File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\depend\analysis.py", line 271, in _safe_import_module
module_basename, module_name, parent_package)
File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1990, in _safe_import_module
module_name, file_handle, pathname, metadata)
File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2028, in _load_module
m = self._load_package(fqname, pathname, packagepath)
File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2813, in _load_package
self._load_module(fqname, fp, buf, stuff)
File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2082, in _load_module
self._scan_code(m, co, co_ast)
File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2544, in _scan_code
self._process_imports(module)
File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2743, in _process_imports
target_module = self._safe_import_hook(*import_info, **kwargs)[0]
File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2221, in _safe_import_hook
target_attr_names=None, level=level, edge_attr=edge_attr)
File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1421, in import_hook
source_package, target_module_partname, level)
File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1573, in _find_head_package
target_module_headname, target_package_name, source_package)
File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\depend\analysis.py", line 271, in _safe_import_module
module_basename, module_name, parent_package)
File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1990, in _safe_import_module
module_name, file_handle, pathname, metadata)
File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2082, in _load_module
self._scan_code(m, co, co_ast)
File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2544, in _scan_code
self._process_imports(module)
File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2743, in _process_imports
target_module = self._safe_import_hook(*import_info, **kwargs)[0]
File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2221, in _safe_import_hook
target_attr_names=None, level=level, edge_attr=edge_attr)
File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1421, in import_hook
source_package, target_module_partname, level)
File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1573, in _find_head_package
target_module_headname, target_package_name, source_package)
File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\depend\analysis.py", line 271, in _safe_import_module
module_basename, module_name, parent_package)
File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1990, in _safe_import_module
module_name, file_handle, pathname, metadata)
File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2082, in _load_module
self._scan_code(m, co, co_ast)
File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2544, in _scan_code
self._process_imports(module)
File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2743, in _process_imports
target_module = self._safe_import_hook(*import_info, **kwargs)[0]
File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2417, in _safe_import_hook
edge_attr=edge_attr)
File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1438, in import_hook
target_module, target_attr_names):
File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1726, in _import_importable_package_submodules
attr_name, submodule_name, package)
File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\depend\analysis.py", line 271, in _safe_import_module
module_basename, module_name, parent_package)
File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1990, in _safe_import_module
module_name, file_handle, pathname, metadata)
File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2082, in _load_module
self._scan_code(m, co, co_ast)
File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2544, in _scan_code
self._process_imports(module)
File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2743, in _process_imports
target_module = self._safe_import_hook(*import_info, **kwargs)[0]
File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2221, in _safe_import_hook
target_attr_names=None, level=level, edge_attr=edge_attr)
File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1421, in import_hook
source_package, target_module_partname, level)
File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1573, in _find_head_package
target_module_headname, target_package_name, source_package)
File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\depend\analysis.py", line 271, in _safe_import_module
module_basename, module_name, parent_package)
File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1990, in _safe_import_module
module_name, file_handle, pathname, metadata)
File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2028, in _load_module
m = self._load_package(fqname, pathname, packagepath)
File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2813, in _load_package
self._load_module(fqname, fp, buf, stuff)
File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2082, in _load_module
self._scan_code(m, co, co_ast)
File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2544, in _scan_code
self._process_imports(module)
File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2743, in _process_imports
target_module = self._safe_import_hook(*import_info, **kwargs)[0]
File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2221, in _safe_import_hook
target_attr_names=None, level=level, edge_attr=edge_attr)
File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1422, in import_hook
target_module = self._load_tail(target_package, target_module_partname)
File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1635, in _load_tail
submodule = self._safe_import_module(head, mname, submodule)
File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\depend\analysis.py", line 271, in _safe_import_module
module_basename, module_name, parent_package)
File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1990, in _safe_import_module
module_name, file_handle, pathname, metadata)
File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2082, in _load_module
self._scan_code(m, co, co_ast)
File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2544, in _scan_code
self._process_imports(module)
File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2743, in _process_imports
target_module = self._safe_import_hook(*import_info, **kwargs)[0]
File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2221, in _safe_import_hook
target_attr_names=None, level=level, edge_attr=edge_attr)
File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1422, in import_hook
target_module = self._load_tail(target_package, target_module_partname)
File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1635, in _load_tail
submodule = self._safe_import_module(head, mname, submodule)
File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\depend\analysis.py", line 260, in _safe_import_module
hook_module.pre_safe_import_module(hook_api)
File "C:\Users\lee\Anaconda3\envs\trademgr2\lib\site-packages\PyInstaller\hooks\pre_safe_import_module\hook-setuptools.extern.six.moves.py", line 34, in pre_safe_import_module
for real_module_name, six_module_name in real_to_six_module_name.items():
AttributeError: 'str' object has no attribute 'items'

(trademgr2) C:\projects\trademgr2\examples\01 - hello_world>

Returning a list from python

Hi,

I am trying to get a list generated in python into javascript, however this is not working.

Here is my Python code

@eel.expose
def remember_settings():
	with open('../config/settings.json', 'r') as f:
		data = json.load(f)
		region = data['region']
		url = data['url']
		webhook = data['webhook']
		use_proxies = data['use_proxies']
		browser = data['browser']
		licensekey = data['license']
		theme = data['theme']
	return [region, url, webhook, use_proxies, browser, licensekey, theme]

And here is my JavaScript code:

window.onload = function remembersettings () {
  load_settings = eel.remember_settings()();
  alert(load_settings[0]);
}

Right now it just comes up with an empty alert, and typeof just returns object...

Am I doing something wrong?

Uncaught TypeError: eel._call_return_callbacks[message.return] is not a function at WebSocket.eel._websocket.onmessage (eel.js:132)

Getting this error, when I try to access Python function result using Jquery.

My base.html file:

<!DOCTYPE html>
<html>
    <head>
        <title>Eel Demo</title>
        <script type='text/javascript' src='/eel.js'></script>
        <link rel="stylesheet" href="css/bootstrap.min.css">
    </head>
    
    <body>
        <div id="result" class="alert alert-success"></div>
        <h1><a href="hello_with_name.html" class="btn btn-warning">Hello</a></h1>
        <input type="text" id="name">
    </body>
    <script src="js/jquery.min.js"></script>
    <script src="js/popper.min.js"></script>
    <script src="js/bootstrap.min.js"></script>
    <script type="text/javascript" src="eel.js"></script>
    <script>
        $(document).ready(function(){
          $('#name').keyup(function(){
            var abc = eel.get_name($(this).val());
            $('#result').append(abc);
          }); 
        });
    </script>
</html>

My python file:

import eel, os, random

eel.init('frontend')

@eel.expose
def pick_file(folder):
    if os.path.isdir(folder):
        return random.choice(os.listdir(folder))
    else:
        return 'Not valid folder'

@eel.expose
def get_name(name):
    print(name)

eel.start('base.html')

Window position resets

Just noticed that if you drag the app partially out of view or partially onto another monitor and then click a link or a button, the app will move itself back fully into view.

Electron-Eel Idea

Love this project, however I discovered a few downsides in the deployment dept.

  • Requires chrome browser to be installed by the user in the target system
  • Packaging with PyInstaller works but displays a console window when launched. Attempting to specify no console causes app to launch and immediately disappear (still investigating this, but many people have encountered it e.g. pyinstaller/pyinstaller#1804)
  • There are no native menus, open file dialog boxes etc. I can't for example browse for a file in the UI and get its full pathname returned to me (browser sandbox restrictions). I can't create professional menus.

I'm wondering if a version of this project could be adapted to work with Electron, using Eel's websocket approach instead of the zerorpc approach taken by https://github.com/fyears/electron-python-example. I'm finding the latter project powerful but its dependence on zerorpc makes it tricky to deploy.

Plus there are Electric eels, aren't there? Thoughts?

How to get values from an HTML button and pass to my python code?

I want to use Eel for a kiosk interface. If I have a button for example:

<button data-id="10">$10.00</button>

And when its clicked, how can I get the value of "10" and then be able to pass it to my python code that does something with it such as calculating some numbers.

Passing 0 as the port will give ERR_ADDRESS_INVALID

For people that want to dynamically assign the port (which is a great idea for this project as the port doesn't have much influence) would set port to 0 like:

eel.start('main.html', options={'port' : 0})

Since the browser is opened on line 100 in __init__.py and the server is then started after on line 109, there is no way that the Chrome window can know what the dynamically assigned port is.

So you'll need to start the server first and then call the Chrome window based on the port the server now has, I am not quite sure how to get the port once the server has started though.

ModuleNotFoundError: No module named 'gevent.__hub_local'

Hi! when building a distributable binary, and try to execute it the following error appear:

Traceback (most recent call last):
  File "hello.py", line 1, in <module>
  File "/home/pc-ia/.local/lib/python3.6/site-packages/PyInstaller/loader/pyimod03_importers.py", line 631, in exec_module
    exec(bytecode, module.__dict__)
  File "eel/__init__.py", line 2, in <module>
  File "/home/pc-ia/.local/lib/python3.6/site-packages/PyInstaller/loader/pyimod03_importers.py", line 631, in exec_module
    exec(bytecode, module.__dict__)
  File "gevent/__init__.py", line 87, in <module>
  File "/home/pc-ia/.local/lib/python3.6/site-packages/PyInstaller/loader/pyimod03_importers.py", line 631, in exec_module
    exec(bytecode, module.__dict__)
  File "gevent/_hub_local.py", line 101, in <module>
  File "gevent/_util.py", line 105, in import_c_accel
  File "importlib/__init__.py", line 126, in import_module
ModuleNotFoundError: No module named 'gevent.__hub_local'

How Eel work with Vue?

I like Eel,it help me out of annoying python gui work.Actually i'm using electron-vue as my GUI,that means i run a electron to interactive with user and run a python web frame(Flask now) to deal with tasks.
I prefer write my web with Vue,But when i run python with eel,the built files(.vue) are not auto injected,So now i want to know whether Eel can work with Vue and how?

Change / refresh / close page?

Hi! Thank you a lot for your work on Eel. I'm wondering if there is a way to open, re-open, or refresh the html page in the very same window? Unfortunately, I couldn't find this information.

I'm using Jinja2 templates for different views. As the program runs, the rendered templates are saved under the same name (index.html) and then should to be re-opened. However, doing ee.start("index.html") for the second time opens a new window beside the previous one. To add to this, the following OSError appears in the process:

OSError: [WinError 10048] Only one usage of each socket address (protocol/network address/port) is normally permitted: ('localhost', 8000)
2018-05-22T20:00:29Z <Greenlet "Greenlet-0" at 0x1ece5058a48: _process_message({'call': 1.5296098246811638, 'name': 'select_new_t, <geventwebsocket.websocket.WebSocket object at 0x0)> failed with OSError

but actually does not seem to affect the program's functionality.

In case if opening another html page in the same window or refreshing it is not possible, is there a way to simply close the old window?

A syntax error of Eel/eel/browsers.py

  File "/Eel-master/examples/01 - hello_world/hello.py", line 12, in <module>
    eel.start('hello.html', size=(300, 200))    # Start
  File "/Eel-master/eel/__init__.py", line 71, in start
    brw.open(start_urls, options)
  File "/Eel-master/eel/browsers.py", line 13, in open
    sps.Popen([chrome_path, '--disable-gpu', '--app=%s' % url] + options['chromeFlags'])
TypeError: can only concatenate list (not "str") to list
13   sps.Popen([chrome_path, '--disable-gpu', '--app=%s' % url] + options['chromeFlags'])

AssertionError: eel.expose() call contains '(' or '='

Hi my program is structured as follows where bundle.js is a file containing all of the JS frontend, including the contents of the file app.js which I have listed below. I have also listed the other two files below. I get an error when running python3 gui.py as follows:

Traceback (most recent call last):
  File "gui.py", line 3, in <module>
    eel.init("dist")                     # Give folder containing web files
  File "/usr/local/lib/python3.6/site-packages/eel/__init__.py", line 60, in init
    assert rgx.findall(r'[\(=]', expose_call) == [], "eel.expose() call contains '(' or '='"
AssertionError: eel.expose() call contains '(' or '='
gui.py
dist
  |- index.html
  |- bundle.js 
// app.js

eel.expose(say_hello_js);
function say_hello_js(x) {
  console.log('Hello from ' + x);
}
say_hello_js('Javascript World!');
eel.say_hello_py('Javascript World!');
<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <script src="/eel.js"></script>
  </head>
  <body>
    <div id="root"></div>
    <script type="text/javascript" src="bundle.js"></script>
  </body>
</html>
import eel

@eel.expose                         # Expose this function to Javascript
def say_hello_py(x):
    print("Hello from %s" % x)

if __name__ == "__main__":
    eel.init("dist")                     # Give folder containing web files
    say_hello_py("Python World!")
    eel.say_hello_js("Python World!")   # Call a Javascript function
    eel.start("index.html")             # Start (this blocks and enters loop)

js - python - js calls

Seems that if I click a button in html which calls Python, and then that Python code happens to call back into javascript in order to e.g. get the state of the DOM, then the latter Python call to Javascript must be asynchronous, otherwise it didn't work reliably for me. In fact attempting such a scenario caused the communication between python/javascript to becomes slow and unresponsive for all communication.

Unless there is Python code running in a thread or at the module level during Python startup, it may be that the above scenario is the typical way Python would call Javascript? And if synchronous calls from Python are attempted and clog/confuse the socket communication, then perhaps synchronous calls from Python to Javascript should not be encouraged or allowed in such cases?

html
<button id="scan_dom" class="btn util_button">scan dom</button>

javascript:

        $('#scan_dom').on('click', function () { scan_dom() })
        async function scan_dom() {
          let n = await eel.py_scan_dom()();
          console.log('Got this from Python: ' + n);
        }
        eel.expose(js_dom_info);
        function js_dom_info() {
            let btn_ids = []
            $('button').each(function(idx, btn) {
                btn_ids.push(btn.id)
            });
            return btn_ids
        }

synchronous python which clogged the socket

@eel.expose
def py_scan_dom():
    # call a javascript function synchronously
    n = eel.js_dom_info()()  # This immeadiately returns the value
    print('Got this from Javascript:', n)

return list(range(10,100,5))

async python which worked ok

@eel.expose
def py_scan_dom():
    def got_dom_info(n):
        print('Got this from Javascript:', n)

    # call a javascript function synchronously
    n = eel.js_dom_info()(got_dom_info)

    return list(range(10,100,5))

Apologies if I have misunderstood something.

Prevent window resizing

As you can probably tell, I would really like to try and use eel to make a professional GUI that is semi-indistinguishable from something built with tkinter and suchlike. To do this I think that it is critical that I have the ability to lock the window size. This is possible with some horrible JavaScript that just brings the window size back to the original size if you try and change it:

var size = [1216,739];
$(window).resize(function(){
  window.resizeTo(size[0], size[1]);
});

Although, this is far from ideal.

I tried to save you the work here by looking it up myself, but even after studying the eel source code I'm not too clear as to what's going on so I'm struggling to search for a solution in the correct context. The closest I came was something like this.

If it's not already a chrome flag, perhaps this could be something that you could add to eel?

Thanks.

Add License

Can you please add a license. This looks very useful, but I shy away from using other people's projects without knowing what permissions they intend.

Can't set window dimensions

Hi,

I am trying to set the width and height of the window but it's not working.

Here is my HTML:

<head>
    <style>body {background-color: red;}</style>
</head>
<body>Test</body>
</html>

And my Python:

eel.init('web')
eel.start('main.html', size=(1200, 700))

What am I doing wrong here?

test file_access.py then js does not work

eel.js error:
Uncaught SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode

I use chrome.

Ths for your answers!!!

中文:
我测试了file_acces.py的例子,点击random file 不起作用,F12查看浏览器报错发现报eel.js的错误,期待大神帮忙解决一下,谢谢!

Can't install on Python 2.7.14 (Anaconda)

I get this error when I try to install on Python 2.7

Collecting eel
  Downloading Eel-0.7.0.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/ff/nh987tyd5jgbzygkb6zm3d200000gn/T/pip-build-yPnvk2/eel/setup.py", line 14, in <module>
        long_description=open('README.md', encoding='utf-8').readlines()[1],
    TypeError: 'encoding' is an invalid keyword argument for this function

I think it has a straightforward solution.

JS: form eel.expose(fct,name) throw a python exception

Just diving into eel ;-)
BUt there is something wrong (i'm trying to call a js method, from python, in a vuejs app ... and I want to callback a component method ... so I'm trying differents approach : and found a bug)

in a vue component, in the created() event : (this works as expected )

  var self=this;
  function say_hello_js(x) {
    self.test2(x);
  }
  eel.expose(say_hello_js);  

it calls the component method (test2)

but this won't work :

  var self=this;
  function say_hello_js(x) {
    self.test2(x);
  }
  eel.expose(say_hello_js, 'say_hello_js'); 

and python side, when starting, throw :

Traceback (most recent call last):
  File "t.py", line 13, in <module>
    eel.init('web')
  File "/home/manatlan/.local/lib/python3.6/site-packages/eel/__init__.py", line 86, in init
    _mock_js_function(js_function)
  File "/home/manatlan/.local/lib/python3.6/site-packages/eel/__init__.py", line 213, in _mock_js_function
    exec('%s = lambda *args: _mock_call("%s", args)' % (f, f), globals())
  File "<string>", line 1
SyntaxError: can't assign to literal

I wanna to try to call back a component's method, from py sides ... and wanted to rename it using the eel.expose with 2 parameters ... but no luck
(perhaps there is a better way ?)

If I found a patch, will push you a PR .... but I'm just evaluating eel
(btw : it's really great !)

Using Electron as front end

I mainly use Eel to make prototypes or personal/internal tools, where polish is not that important, but if you want to make a more professional looking app with HTML/JS frontend, and Python backend, you can use Electron as the browser. This will give you total control over things like right click menus, menubars etc.

I have added a new custom mode which just runs whatever command you provide in args. In the future I might add more "first class" support for Electron.

The absolute smallest possible Electron app needs two files, a package.json file that looks like...

{
  "main": "main.js",
  "devDependencies": {
    "electron": "^2.0.0"
  }
}

and a main.js that looks something like...

const electron = require('electron')
const app = electron.app
const BrowserWindow = electron.BrowserWindow

let mainWindow

function createWindow () {
  mainWindow = new BrowserWindow({width: 800, height: 600})
  mainWindow.loadURL('http://localhost:8000/start_page.html');
  mainWindow.on('closed', function () {
    mainWindow = null
  })
}

app.on('ready', createWindow)

app.on('window-all-closed', function () {
  app.quit()
});

app.on('activate', function () {
  if (mainWindow === null) {
    createWindow()
  }
})

Then, in your python script, you need to specify options something like...

options = {
	'mode': 'custom',
	'args': ['/usr/local/bin/electron', '.'],
	(...)
}
eel.init('web')
eel.start('start_page.html', size=(800, 600), options=options)

Python2+Linux environment fail

Using Linux and Python2 raises an error:

Traceback (most recent call last):
  File "run.py", line 99, in <module>
    eel.start('main.html', size=(650, 612))
  File "/home/marco/git/auto-py-to-exe/venv/local/lib/python2.7/site-packages/eel/__init__.py", line 84, in start
    brw.open(start_urls, options)
  File "/home/marco/git/auto-py-to-exe/venv/local/lib/python2.7/site-packages/eel/browsers.py", line 8, in open
    chrome_path = find_chrome()
  File "/home/marco/git/auto-py-to-exe/venv/local/lib/python2.7/site-packages/eel/browsers.py", line 32, in find_chrome
    return find_chrome_linux()
  File "/home/marco/git/auto-py-to-exe/venv/local/lib/python2.7/site-packages/eel/browsers.py", line 50, in find_chrome_linux
    chrome = shu.which(name)
AttributeError: 'module' object has no attribute 'which'

This is due to the fact that which is not in shutil module for Python 2 (or is not anymore)

Crashes after a short period of time

Sorry for all the issues but I'm just trying to get a simple GUI up and running but I'm having quite a lot of problems.

My current GUI consists of 3 .html documents and 4 .css files (one global and three individual).

When I open my GUI it works fine at the start, I can click on each item of my menu and it switches between the html documents great. However, if I start clicking on the links in fairly quick succession the program crashes with no error in the console, but the error on the GUI is

localhost refused to connect

Even if I don't click very fast, the python script will end, but I can still click around for a while (it's very slow), I presume this is because it's cached or something, and then it will run into the same error as before.

Has anyone else experienced issues like this? My code is not very complicated.

Here is my python:

import eel
eel.init('web')
eel.start('settings.html', size=(1216, 736))

And my HTML on all 3 is literally just a menu with links at the moment and the CSS is just simple styling.

EDIT: I have no such problems if I go to localhost in my browser.

eel.start(<remote url>) ? Not Possible

Loving the project. Been looking for something like this for so long, but did not actually know it lol.

Anyways, I tried doing eel.start('https://www.mydomain.com') however it seems that it requires that it pull from http://localhost.

I was hoping to integrate offline and online into one application (a Hybrid app if you will).

Is this possible ?

Parsing eel.expose calls doesn't respect the name param

Parsing the eel.expose calls from the js files doesn't respect the name parameter. It grabs all thats inside of the call and tries to assign a lambda function to that, which results in things like:

function, 'myFunction' = lambda...

This is annoying, because it makes anything more than trivial function labels impossible to use - in typescript:

class TestClass {
    constructor () {
        eel.serverPrint('Hello from the client!')
        eel.expose(this.consolePrint, 'consolePrint')
    }

    consolePrint(s : string) {
        console.log('Message from server:' + s);
    }
}

this fails on both assigning a value to this.consolePrint and 'consolePrint.'

Ima just hack this in to a local branch. It does seem like there is a better way to do this whole part, though.

eel.init(path):
  ...
                        if ',' in expose_call:
                            expose_call = expose_call.split(',')[1]
                        expose_call = expose_call.strip().strip('\'')
  ...

Compiled exe fails with 'Failed to execute script'

On WIndows 8.1 x64, Python 3.6.5 32-bit, after building examples from Eel /examples into single executable with --onefile and --noconsole, I am getting error 'Failed to execute script ABC'. Running script directly by Python is OK. Any clue what might be missing or incorrect here? Thank you in advance.

Can I build websites with Eel?

I briefly read some documents about Eel and found its idea awesome. Besides what is already achieved, I think this idea has better potential. Instead of building a local App, why don't we build a website that can be accessed from everywhere? I know sometimes a local App is better, but I think this choice should be left to the user. So I suggest opening a local browser to be an optional feature and adding support for some kind of authentication. It can be basic HTTP authentication in case I host some private stuff on my VPS.

I tried to test my idea. But Eel cannot install under Python 2. I am not sure if it is compatible with 2 because I see some Todo in the src.

MIME type is text/plain

Hey! I love using eel so far, its been so simple to get going.

I'm trying to use vue with eel and when importing via type="text/module" im getting an error in my javascript console saying:

Failed to load module script: The server responded with a non-JavaScript MIME type of "text/plain". Strict MIME type checking is enforced for module scripts per HTML spec.

Is there anyway to change the mime type? I checked the bottle reference and it looks like there is a way but when I tried to implement it by changing the _static() method I got no change.

Problem with dimensions

Hello,

I am trying to set the dimensions for my app but for some reason the dimensions in my python code are different to those of the HTML window. In HTML I set the body to be 1200px width and 700px height, and that is the area I want to show in my app. However, in eel I specified the size to be (1200, 700) and it is too small. Through trial and error I found out that the correct size is (1216, 736)... Why is this?

Cannot import in IDLE anymore

When trying to execute import eel in a script that is run from IDLE (F5), it will become stuck; no errors will appear, it will just hang.
This is occurring on the 0.9.10 and 0.9.9 releases from PyPI. Downgrading to 0.9.7 (0.9.8 was never released) fixes this issue.
I am currently using Python 3.5.2

not allowed to load local resource

i keep getting this error in chrome dev-tools, i know that this problem can be solved with creating a local server bcs browser can't directly access your local files for security reason. But when eel app is running it runs on a local server, so why this error keep showing?

Feature Request: Jiinja2 like templating engine

Eel works like charm. I have made many apps using eel. Thanks for such an awesome package. It would be nice to have some templating engine like Django's Jinja2. Currently, I need to repeat the html headers and footers for each page. To avoid this, can we have some templates?

Pyinstaller traceback error eel



I tried to build (package) eel program using pyinstaller.
Pyinstaller workes fine and build the app successfully.
But when i tried to run the exe in dist folder i got following error:-

`Traceback (most recent call last): File "C:\Users\Administrator\Desktop\PythonEel\oslister.py", line 1, in import eel, os, random File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36-32\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 631, in exec_module exec(bytecode, module.__dict__) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36-32\lib\site-packages\eel\__init__.py", line 2, in import gevent as gvt File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36-32\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 631, in exec_module exec(bytecode, module.__dict__) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36-32\lib\site-packages\gevent\__init__.py", line 87, in from gevent._hub_local import get_hub File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36-32\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 631, in exec_module exec(bytecode, module.__dict__) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36-32\lib\site-packages\gevent\_hub_local.py", line 101, in import_c_accel(globals(), 'gevent.__hub_local') File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36-32\lib\site-packages\gevent\_util.py", line 105, in import_c_accel mod = importlib.import_module(cname) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36-32\lib\importlib\__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) ModuleNotFoundError: No module named 'gevent.__hub_local' [1240] Failed to execute script oslister`

Help Needed

Exe file 'distribution not found'

When I was testing if I had any trouble compiling the examples, I already ran into a problem.
When comiling the 'sync_callbacks' example this happens when I run the exe:
https://dl.dropboxusercontent.com/s/x4qpuurck9gqcaf/2018-09-18_14-58-15.mp4

I doesnt always show the same error,
sometimes it says
'The 'cffi>=1.11.5' distribution was not found and is required by the application'
or
'The 'greenlet>=0.4.14' distribution was not found and is required by the application'

Images in stylesheets

I have tried a few different ways to get images in stylesheets working, but haven't figured it out yet. Do you have any tips for how the path should be structured?

Here is my structure

  • web
    -- index.html
    -- styles/
    -- styles/main.css
    -- images/
    -- images/background.jpg

The HTML loads fine, and if I include the styles directly in the index.html file, the image loads... just not from the main.css stylesheet.

I have tried ../images/background.jpg and ./images/background.jpg

Any tips?

Debugging with Microsoft Visual Studio Code

Hi all,

First of all, many thanks to @ChrisKnott for this magnificent script. It so shamelessly simple and amazingly powerful at the same time, I'm really impressed!

I tried out to make some debugging on Python side using MS Visual Studio Code (which is pretty cool and written in Electron apparently), but it doesn't seem to work.

I figured out to set up the debugger (you have to define a "launch.json" file in your root folder) so to consider the monkey patching of gevent by setting the "gevent": true option, but it still remains stuck as soon as it imports the eel package. This may related to some code in bottle (which has a debug=True option, by the way) but I'm really guessing at this point.

Has anyone succeeded debugging in some eel project?

Thanks in advance and have a great day.

Broadcast to all connected clients

Great project @ChrisKnott !
Is it possible to somehow emit/broadcast to all connected clients?

I see 2 types of usage:

  • from one client to all other clients (excl the sender client)
  • from server to all clients

Currently working on a home controller python app and want to broadcast status changes (eg light#1 switched on) to all connected 'remote control' clients so that the UI is updated accordingly. I am now sending own defined JSON packages over web sockets, but your solution is way better!

Best way to handle 'long event'

OK, so am really new to Python but not Javascript. However I am aware that async / await in Javascript has come from the Python world.

What I want to do is have JS call a Python function. This function then does some long processing. IE:- Searches inside a file where that file is really big. Or does a search on the internet and not sure how long it's going to be.

My question is, what do I return back from my Python function to let JS know about this? The only solution I can come up with is long polling but there has to be a better way.

Another way, I think, would be generators but I am not really clued up on them yet.

When any function returns from Python does JS get a promise handle? If so, then I can just await in JS itself.

Hope I've explained this and not made it too complex, lol.

Stopping Asynchronous Python

Thanks and congrats for the great project.
I am starting on python and this helped me a lot.

I am running your assync example and it is working good:

import eel
eel.init('web')

def my_other_thread():
    while True:
        print("I'm a thread")
        eel.sleep(1.0)                  # Must use eel.sleep()
    
eel.spawn(my_other_thread)

eel.start('main.html', block=False)     # Don't block on this call

while True:
    print("I'm a main loop")
    eel.sleep(1.0)                      # Must use eel.sleep()

Therefore, I need at a certain moment to stop the thread which is running ( eel.spawn(my_other_thread) ).
I already tried something like: test = eel.spawn(my_other_thread), and test.kill() to stop it, but did not work.
How should I do it?

Actually, I am working on a project with some pages. Each page will have some functions that should be running in the background for retrieving new data. But when I switch pages, the other functions should be stopped.
How could I make this easier?

Thank you very much!

Create-React-App

Does anyone know how to get this working with Create-React-App ?
I've been struggling all day and I am still nowhere forward :(

It works if I build the CRA itself BUT I have to keep doing this every time I change something. Create-REact-App comes with it's own Dev server that hot reloads and I wanted to be able to plug into it but when I do a console.log(eel) it always prints undefined.

404 Not found, file does not exist

I have this structure

gui.py
web/
  index.html

And this inside gui.py

import eel
eel.init('web')
eel.start('index.html')

When I run the script I get this

screenshot_16

Why is that?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.