The flow chart to debug python made mac app related errors, derived from my recent experience of python mac app development

uxcrepe_The flow chart to debug python made mac app related errors, derived from my recent experience of python mac app development python app development
uxcrepe_The flow chart to debug python made mac app related errors, derived from my recent experience of python mac app development

TL:DR;

uxcrepe_open console or terminate error flow chart

For busy people having just 10 seconds to read, look at this picture(^)

For people having 30 seconds, do this:

  1. There’s almost no info on the web, relating to mac OS python app distribution
  2. The open console option hardly helps
  3. Accessing the resource by right clicking is probably the most easy way, it surely helps

For people having more time, read below:

My developing environment FYI

  • OS:macOS Catalina version 10.15.6
  • python:3.8.5

My purpose of python made mac app distrubution

So you want to distribute python right? I did too. I was working on QRRT, the SERP(Search Engine Result Page) app, and wanted to use a python library Beautiful Soup. Since the app I was making was quite simple app, it might have been easier if I can code in plain swift. However, since I code as a hobby, I wanted to use my python skillset to solve my problem. This lead to quite a messy situation, since I was naively thinking “there’s plenty of info on the web, so I should just Google this!”

My developing environment, tkinter + py2app

I used tkinter on my way to develop my app’s GUI, and then py2app to convert it to a distributable mac OS app. Here’s how it looked like in the beginning:

uxcrepe_Not beautiful user interface, but works perfectly for my purpose.

This app worked beautifully, on my mac. So I decided to try distributing, which I had no idea that will take me for more than 2 weeks to solve…

Here comes the “Open Console or Terminate” error

After running py2app, zipping my source code for distribution, I begin to have this error. Since I thought something was wrong, I clicked Open console, and the console with lots of processing message pops up like this:

uxcrepe_The error message giving me no info

I started to Google for likely keywords such as “py2app error”, “py2app open console terminate”. But since there was so few info on the web, I found no information which directly addressed my question, so. Let’s jump to conclusion.

Use “right click -> Show Packages -> Resources -> Mac OS”, and execute your app directly do help, because it shows specific errors on the console

This will show you the results, and you will have a more acurate understanding for your errors. As for me, I didn’t add a library required to the setup.py, which lead me to this error.

Lastly

I know your error sucks, but let’s keep up with it.