0

I just packaged an app using PyInstaller, onedir mode. Then I encounter a weird problem. When I did it the first time, the exe file has no problem to open. Then I packaged a new version, I was never able to open the exe file again. The error is shown below. I searched quite a while online, but no solution found yet.

I'm using -

Windows 10

Python 3.8.2

Pyinstaller 3.6

error pic

1 Answer 1

1

Try to use the autopytoexe. And within it select to export to one file. It solved that issue for me.

12
  • I kinda do it as onedir mode on purpose, because I want to make my app launch faster. I
    – Gaz Zhao
    Commented Jul 12, 2020 at 11:58
  • Ok, can you show me the command with which you ran the pyinstaller? Commented Jul 12, 2020 at 12:00
  • sure. that is "pyinstaller --onedir --windowed --icon=icon.ico DataPal.py"
    – Gaz Zhao
    Commented Jul 12, 2020 at 12:01
  • Ikleiv, somebody online said it is because of the icon setting, remove it should be fine, but I also need that icon.
    – Gaz Zhao
    Commented Jul 12, 2020 at 12:02
  • Try without the icon. If that works with it then install that dev.to/eshleron/… and try to convert it with that program. Also please try to change the name of an icon - it might seem to be stupid, but sometimes naming something with the keyword name provides an error. Commented Jul 12, 2020 at 12:04

Not the answer you're looking for? Browse other questions tagged or ask your own question.