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

No module named six.moves #97

Open
loeffel-io opened this issue Mar 11, 2024 · 4 comments
Open

No module named six.moves #97

loeffel-io opened this issue Mar 11, 2024 · 4 comments

Comments

@loeffel-io
Copy link

Python version: Python 3.12.2
Workflow version: v2.3.1

@eliliam
Copy link

eliliam commented Mar 18, 2024

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

@eliliam
Copy link

eliliam commented Mar 18, 2024

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

@loeffel-io
Copy link
Author

loeffel-io commented Mar 20, 2024

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

@tsale
Copy link

tsale commented Jul 2, 2024

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.

CleanShot 2024-07-02 at 11 08 42@2x

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

3 participants