alfred-fakeum
alfred-fakeum copied to clipboard
No module named six.moves
Python version: Python 3.12.2 Workflow version: v2.3.1
Having this same exact issue, any progress in identifying the cause?
When I navigate to where the workflow data is saved, which in my case is ~/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.DF96DE0C-9D09-41DD-9833-A0D51BB037FF
, I see the fakeum.py
script. When running that script as suggested by the workflow itself via python3 fakeum.py uuid
for example, I am met with this response:
Traceback (most recent call last):
File "/Users/eli/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.DF96DE0C-9D09-41DD-9833-A0D51BB037FF/fakeum.py", line 21, in <module>
from workflow import Workflow3, ICON_WARNING, MATCH_ALL, MATCH_ALLCHARS
File "/Users/eli/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.DF96DE0C-9D09-41DD-9833-A0D51BB037FF/workflow/__init__.py", line 16, in <module>
from .workflow import Workflow, manager
File "/Users/eli/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.DF96DE0C-9D09-41DD-9833-A0D51BB037FF/workflow/workflow.py", line 25, in <module>
import cPickle
ModuleNotFoundError: No module named 'cPickle'
It seems strange to me that I am seeing two different errors entirely, one via alfred and the other when running the script myself. What's even more strange is that when I open a REPL using python3
, and try import six.moves
, it works totally fine!
Python 3.12.2 (main, Feb 6 2024, 20:19:44) [Clang 15.0.0 (clang-1500.1.0.2.5)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import six.moves
>>> six.moves
<module 'six.moves' (<six._SixMetaPathImporter object at 0x102753d40>)>
My Python3 path is /opt/homebrew/bin/python3
which is Python 3.12.2 installed via brew
I found the solution in the updated fork of Fakeum, you need to change python3
to be /usr/bin/python3
in the script editor in Alfred. Here is the issue in question: https://github.com/giovannicoppola/alfred-fakeum/issues/3
I found the solution in the updated fork of Fakeum, you need to change
python3
to be/usr/bin/python3
in the script editor in Alfred. Here is the issue in question: giovannicoppola#3
This just runs another python3 version and is no reliable solution. All in all is this workflow not working with python >= 3.12 i think
As @loeffel-io mentioned, the problem is with Python >= 3.12. A solution would be to edit the workflow and replace the script execution parts from Python3 (assuming it defaults to Python 3.12) with Python3.x.