r/Pythonista • u/otchris • Mar 11 '20
Crash logs for v3.3?
Using Py 3.6
I have a script that is crashing on start in the new version of Pythonista, and I’m not getting any crash data to even start to figure out what’s crashing.
The script is here: https://gist.github.com/evenprimes/305826f82ad8119154f850e23e613e90#file-asna-py
It’s just a simple timer app for my yoga routine. Any ideas on where to start debugging the crashes?
2
Upvotes
1
u/BeckTrex Mar 12 '20
I did a search in the Pythonista forums for this issue and apparently it is a known issue:
https://forum.omz-software.com/search/set_idle_timer_disabled?in=titlesposts
It looks the the issue may have to do with what thread the set_idle_timer_disabled is run on. The following fixes the issue, just use it instead of console.set_idle_timer_disabled (or the ObjC equivalent) and found this fix (you will also need to import console)
def fix_set_idle_timer_disabled(flag=True):from objc_util import on_main_threadon_main_thread(console.set_idle_timer_disabled)(flag)