keybraker / python-gui-electron

A simple example on how to create electron GUIs for python programs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to preload script

bertcoerver opened this issue · comments

I'm following the instructions in your readme, the GUI loads but the buttons are not doing anything. In the console I get the following errors:

Unable to load preload script: /Users/hmcoerver/electron-GUI-for-python/electron/gui_example.js
(anonymous) @ VM4 sandbox_bundle:2
VM4 sandbox_bundle:2 Error: module not found: child_process
    at preloadRequire (VM4 sandbox_bundle:2:82255)
    at <anonymous>:4:14
    at runPreloadScript (VM4 sandbox_bundle:2:83095)
    at VM4 sandbox_bundle:2:83354
    at VM4 sandbox_bundle:2:83509
    at ___electron_webpack_init__ (VM4 sandbox_bundle:2:83513)
    at VM4 sandbox_bundle:2:83636

and

gui_example.js:1 Uncaught ReferenceError: require is not defined
    at gui_example.js:1:13

Any ideas what I'm doing wrong?

Yeah, I have the same problem 😣

Hello everyone, I have been busy with other things lately, will take a look at the error and come back to you as soon as I have update the implementation.

Hello again, I have made some adjustments to it, as the program did not run on Windows for me either, I have not yet tested it on macOS though.
I have made some updates that solve the majority of the problems, please pull and take a look!

@bertcoerver @sonniydsgn

After the updates, the GUI works well, thanks!