0

When I run my main.py file from console like python main.py everything works just fine. However when I package the app with zippapp it opens up window and apparently shows some error which I am unable to read because it immediately closes.

How to debug/resolve this? Is it possible to somehow stop that so I can see the error?

I have folder in which is data folder and app folder, in the app folder there is main.py and there is my_function() which is being run. The zipapp command:

python -m zipapp Entire_package -m app.main:my_function

romanzdk
  • 930
  • 11
  • 30
  • would be good to log to a file the exceptions you are catching... – ΦXocę 웃 Пepeúpa ツ Mar 01 '21 at 09:51
  • But it does not seem like a code error because it does not even execute first command in the ```my_function()``` - seems more like some import problem or something like that - I do not know how to (or is it even possible?) catch these – romanzdk Mar 01 '21 at 10:01

1 Answers1

0

Lulz.

One just have to run the .pyz file from terminal/command line with python like this:

python my_executable_pyz_file.pyz

and then you get the error printed straight into the terminal/cmd window and you can read it.

romanzdk
  • 930
  • 11
  • 30