Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken in macOS 12.3 (Apple removed python 2.7) #34

Open
michaelpporter opened this issue Jan 30, 2022 · 5 comments
Open

Broken in macOS 12.3 (Apple removed python 2.7) #34

michaelpporter opened this issue Jan 30, 2022 · 5 comments

Comments

@michaelpporter
Copy link

Apple removed python 2.7 from the OS.

[07:21:20.727] ERROR: Git Repos[Script Filter] Code 127: /Users/USER/Library/Caches/com.runningwithcrayons.Alfred/Workflow Scripts/2AFCB159-8D2A-4CAF-952B-E85AEFF61D0A: line 1: /usr/bin/python: No such file or directory

If I update the path to /usr/bin/python3 I get the following errors.

[07:33:46.057] ERROR: Git Repos[Script Filter] Code 1: Traceback (most recent call last):
  File "repos.py", line 34, in <module>
    from workflow import Workflow3, ICON_WARNING, ICON_INFO
  File "/Users/USER/Documents/sharedsystem/Alfred/showtime/Alfred.alfredpreferences/workflows/user.workflow.7065A959-FB75-4F7A-8F72-DFFD2FF19068/workflow/__init__.py", line 16, in <module>
    from .workflow import Workflow, manager
  File "/Users/USER/Documents/sharedsystem/Alfred/showtime/Alfred.alfredpreferences/workflows/user.workflow.7065A959-FB75-4F7A-8F72-DFFD2FF19068/workflow/workflow.py", line 25, in <module>
    import cPickle
ModuleNotFoundError: No module named 'cPickle'

The version installed by Xcode is:

/usr/bin/python3 --version
Python 3.8.9
@ddulic
Copy link

ddulic commented Mar 18, 2022

Temporary fix is to install python2. Quickest way is to grab the official installer - https://www.python.org/downloads/release/python-2716

You then have to update all the /usr/bin/python paths to /usr/local/bin/python2 in the Workflow in the Alfred UI and within a few files. The easiest way is to load up the whole workflow folder in an editor of your choice and replace all the python paths via find and replace.

@rachelcsimmons
Copy link

@ddulic I noticed that Git Repos has a lot of /usr/bin/env python but not /usr/bin/python

Should it still be replaced?

@mcadotsch
Copy link

@deanishe Is it planed some time to migrate the workflow to python3 ?

@cstromquist
Copy link

@ddulic - Thank you. That fixed it for me.

@aik099
Copy link

aik099 commented Mar 14, 2024

The solution is provided in the #38.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants