You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I had problem with creating standalone executable, but I have figured it out. I am not confident to make a pull request, but I'd like to share it at least this way.
I am using auto-py-to-exe to make the binary both on Windows and Linux. The problem was:
Missing dynamic library from webui
Wrong path to web files - if you want them separately, like examples/andershell3000 with ui folder, resulting in "Resource Not Available" at runtime window.
The solution to missing library was to adding this option in auto-py-to-exe: Advanced ➝ What to bundle, where to search ➝ --collect-binaries type: webui
So the complete pyinstaller command was like this in my case: pyinstaller --noconfirm --onefile --windowed --add-data "/home/gordon/Dokumenty/PlatformIO/Projects/python-webui/examples/andershell3000/ui:ui/" --collect-binaries "webui" "/home/gordon/Dokumenty/PlatformIO/Projects/python-webui/examples/andershell3000/andershell3000.py" Do not forget to add the ui folder as well.
The solution to wrong webfile's path was to dynamically creating absolute path on runtime. Let's take examples/andershell3000/andershell3000.py. By changing it like this:
Activity
AlbertShown commentedon Jul 2, 2025
Thank you for the solution, let me check this.