• eh

    I have a simple script like so:

    def _notification(delay=0):
                {"title": "ok"},
                {"title": "Snooze", "url": "SCRIPT_RUN_URL&argv=snooze"},
    def main():
        len(sys.argv) > 1 and sys.argv[1] == "snooze":
            _notification(delay=10*60)  # 10 minutes -> seconds
    if __name__ == '__main__':

    (I think that above should work, I'm not sure I'm just typing it up from memory. But the gist is that when I run the script I get a notification immediately with an option to 'snooze' it, which calls the same script with a 10 minute delay for the notification.)

    These notifications show up on my watch just fine, and on my watch I even get the option to hit "ok" or "snooze".

    This behavior seems to be extremely inconsistent though. Sometimes hitting "snooze" on the watch will trigger the second notification in 10 minutes, but sometimes it doesn't. Nothing has changed between these attempts so I can't figure out the issue, nor do I see why there would be one.

    When I don't get the second notification, I can go into the Pythonista console and verify that there is a notification scheduled. What's odd is that when I go into the console and verify that the notification is scheduled, it usually does show up 10 minutes from when I verified it.

    Anyone else have this issue or experienced something similar?

    posted in Pythonista read more
Internal error.

Oops! Looks like something went wrong!