Closed jdloft closed 2 years ago
Can I assume that Python 3 is available?
The codebase should be compatible so that would be a quick fix
Yes, Apple's python3 is still available at /usr/bin/python3
. I imagine this is just a matter of changing the shebangs?
This may be Alfred's bug because it seems to hardcode the interpreter to /usr/bin/python
in the script filter.
While Alfred provides instructions for workflows such as this that require Python 2, it seems to imply that workflows should update to Python 3: https://www.alfredapp.com/help/kb/python-2-monterey/
How that is to be done isn't clear, I assume using bash or external script to call python3
instead.
I've created a new version that should fix the issue. Can you try? https://github.com/WoLpH/alfred-converter/blob/master/unit_converter.alfredworkflow
Looks like maybe some hardcoded references to your machine in there? I get this error when I look at debugging mode:
[17:23:48.325] ERROR: Unit converter[Script Filter] Code 1: Traceback (most recent call last): File "converter/main.py", line 102, in
with open('/Users/rick/workspace/alfred-converter/log.txt', 'a') as fh: FileNotFoundError: [Errno 2] No such file or directory: '/Users/rick/workspace/alfred-converter/log.txt'
If I comment out this part of main.py
, then things seem to work though 👍 :
with open('/Users/rick/workspace/alfred-converter/log.txt', 'a') as fh:
import pprint
pprint.pprint(os.environ, stream=fh)
print(sys.argv, file=fh)
Sorry about that. I accidentally left in that debug code
I've uploaded a new version :)
Workflow fails with
On latest macOS beta the old python 2 binary has been removed.