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

Error when running on Monterey 12.3 #33

Open
dannyw opened this issue Mar 29, 2022 · 9 comments
Open

Error when running on Monterey 12.3 #33

dannyw opened this issue Mar 29, 2022 · 9 comments

Comments

@dannyw
Copy link

dannyw commented Mar 29, 2022

I just upgraded to the latest version of MacOS and unfortunately it broke these wonderful workflows. It appears that /usr/bin/python has been removed. Executing a command gives the following error:

[14:30:43.717] ERROR: Bear[Script Filter] Code 127: /bin/bash: /usr/bin/python: No such file or directory

/usr/bin/python3 does exist, but pointing the Bear commands directly to that version still produces an error:

ModuleNotFoundError: No module named 'cPickle'

Any one else run into this? Any ideas on how to resolve? Thanks in advance.

@RStankov
Copy link

RStankov commented Apr 9, 2022

I have the same issue. No python2 and script doesn't work with python3.

@redgluten
Copy link

redgluten commented Apr 21, 2022

Indeed it would be great to have a port of this (awesome 👍) workflow to Python 3. In the meantime you can follow the instructions here to solve your issue.

@MattHardcastle
Copy link

A Py3 port is possible. Most of the code that fails under Py3 is in the vendored copy of alfred-workflow in the workflow directory. The alfred-workflow library doesn't support Py3, but NorthIsUp/alfred-workflow-py3, a fork, does. Unfortunatly, the fork dropped support for Py2 completely, so there's no easy option to support Py3 in a backward compaitable way. Since it's likely many folks installed Py2 to work around the Py3 failure, all of the failures will need to be resolved in a way that's supported with both Py{2,3}.

IMO this is a great Alfred plugin. It's been mentioned on Bear's Blog! You can't get better SEO. I'd love to see it updated to support modern Python.

@MattHardcastle
Copy link

I just created a bunch of pull requests that get Py3 working on my Sonoma machine. They are all merged togther in the next branch of my fork of this repository. I've tested them a bit in Py3 but they could use some more eyes.

@chrisbro
Copy link
Owner

chrisbro commented Jul 3, 2024

@MattHardcastle Would you like me to add you as a collaborator? I'm obviously not keeping up with this and am happy to hand over control if you'd like it.

@MattHardcastle
Copy link

@chrisbro That'd be fine with me. I can pull together a release branch after I finish testing and figuring out how the update works.

@MattHardcastle
Copy link

Progress report:

Next action:

@MattHardcastle
Copy link

Progress report:

Next action:

  • test update in Py{2,3} until I confident they work (I'm 80% there)

@MattHardcastle
Copy link

The workflow and its update process are working on my Big Sur and Sonoma Macs. I stashed a bundle of the commits that got it functional on my webserver. It's based off the 0.3.5 tag. The next ref in the bundle is the branch that I confirmed worked.

I'm not going to continue with this codebase. I deleted my fork, which closed all my PRS, but please anyone feel free to grab the bundle and run with it.

Fixing up alfred-bear was the first project I've done with an Alfred workflow. It taught me a lot about them.

I'm stopping here because IMO the workflow module alfred-bear uses is bloated with age and feature I don't consider valuable, like an environment and cache abstration and automatic updates. Another reason is that the tag search feature appears to break with Bear migrations. I wouldn't want to remove the feature, but I also don't want to maintain it.

Since I only use text search of the note and I can get away with a light Alfred workflow layer I decided to write yet another Bear workflow and workflow library. I started fresh with Python3 and the most recent Alfred APIs. If you're interested, I published the workflow, Bear Search, on my website.

Thanks for following along! See you around.

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

5 participants