mutdmour/alfred-workflow-cheatsheet

Does not work after Monterey 12.3 update

dchew006 opened this issue · 3 comments

Cheatsheet does not work after python 2 was removed in macOS 12.3.
Reinstalling python 2 under homebrew does not seem to work in this case.

Output:
Screenshot 2022

I've tried a few workaround for this, but no luck either.

Tried ~/.pyenv/versions/2.7.18/bin/python as well as export PATH=$PATH:/usr/local/bin both to the top of the script filter, but no luck.

They both get rid of that error, but then this other error pops up and I don't know why because the icon file does exist...

[17:07:21.249] ERROR: Cheatsheet[[Script Filter](alfredpreferences:workflows%3Eworkflow%3Euser.workflow.4EFB589B-5B54-4B34-AF59-85E5223A36A3%3E61503630-0367-4047-90B3-D78A9C380E92)] Code 1: 17:07:21 workflow.py:1548 DEBUG    default data serializer: json
17:07:21 workflow.py:1579 DEBUG    data `custom` stored as `json`
17:07:21 workflow.py:1594 DEBUG    stored data loaded: /Users/anodigital/Library/Application Support/Alfred/Workflow Data/com.mutdmour.cheatsheet/custom.json
17:07:21 workflow.py:1462 DEBUG    reading settings from /Users/anodigital/Library/Application Support/Alfred/Workflow Data/com.mutdmour.cheatsheet/settings.json
17:07:21 workflow.py:1462 DEBUG    reading settings from /Users/anodigital/Library/Application Support/Alfred/Workflow Data/com.mutdmour.cheatsheet/settings.json
.
17:07:21 workflow.py:2055 DEBUG    ---------- Cheatsheet (1.11.0) ----------
17:07:21 workflow.py:1462 DEBUG    reading settings from /Users/anodigital/Library/Application Support/Alfred/Workflow Data/com.mutdmour.cheatsheet/settings.json
17:07:21 workflow.py:1462 DEBUG    reading settings from /Users/anodigital/Library/Application Support/Alfred/Workflow Data/com.mutdmour.cheatsheet/settings.json
17:07:21 workflow.py:2334 INFO     checking for update ...
17:07:21 background.py:233 DEBUG    [__workflow_update_check] command cached: /Users/anodigital/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/com.mutdmour.cheatsheet/__workflow_update_check.argcache
17:07:21 background.py:237 DEBUG    [__workflow_update_check] passing job to background runner: [u'/usr/bin/python', '/Users/anodigital/Dropbox/Alfred.alfredpreferences/workflows/user.workflow.4EFB589B-5B54-4B34-AF59-85E5223A36A3/workflow/background.pyo', u'__workflow_update_check']
17:07:21 workflow.py:2074 ERROR    [Errno 2] No such file or directory
Traceback (most recent call last):
  File "/Users/anodigital/Dropbox/Alfred.alfredpreferences/workflows/user.workflow.4EFB589B-5B54-4B34-AF59-85E5223A36A3/workflow/workflow.py", line 2064, in run
    self.check_update()
  File "/Users/anodigital/Dropbox/Alfred.alfredpreferences/workflows/user.workflow.4EFB589B-5B54-4B34-AF59-85E5223A36A3/workflow/workflow.py", line 2336, in check_update
    run_in_background('__workflow_update_check', cmd)
  File "/Users/anodigital/Dropbox/Alfred.alfredpreferences/workflows/user.workflow.4EFB589B-5B54-4B34-AF59-85E5223A36A3/workflow/background.py", line 238, in run_in_background
    retcode = subprocess.call(cmd)
  File "/Users/anodigital/.pyenv/versions/2.7.18/lib/python2.7/subprocess.py", line 172, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/Users/anodigital/.pyenv/versions/2.7.18/lib/python2.7/subprocess.py", line 394, in __init__
    errread, errwrite)
  File "/Users/anodigital/.pyenv/versions/2.7.18/lib/python2.7/subprocess.py", line 1047, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory
17:07:21 workflow.py:2097 DEBUG    ---------- finished in 0.068s ----------
[17:07:21.251] Cheatsheet[[Script Filter](alfredpreferences:workflows%3Eworkflow%3Euser.workflow.4EFB589B-5B54-4B34-AF59-85E5223A36A3%3E61503630-0367-4047-90B3-D78A9C380E92)] <?xml version="1.0" encoding="utf-8"?>
<items><item valid="no"><title>Error in workflow 'Cheatsheet'</title><subtitle>[Errno 2] No such file or directory</subtitle><icon>/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/AlertStopIcon.icns</icon></item></items>

Fixed by #35 and released with new version 1.12