deanishe / alfred-convert

Convert between different units in Alfred
Other
721 stars 56 forks source link

ModuleNotFundError: No module named 'cPickle' #34

Closed Canorus closed 6 years ago

Canorus commented 6 years ago
[2017-12-17 09:17:42][ERROR: input.scriptfilter] Code 1: Traceback (most recent call last):  

File "convert.py", line 20, in <module>  

from workflow import Workflow3, ICON_WARNING, ICON_INFO  

File "/Users/Canor/Dropbox/Alfred.alfredpreferences/workflows/user.workflow.5E09B0F2-1E7D-4131-8F98-A36B01C3707E/workflow/__init__.py", line 16, in <module>  

from .workflow import Workflow, manager  

File "/Users/Canor/Dropbox/Alfred.alfredpreferences/workflows/user.workflow.5E09B0F2-1E7D-4131-8F98-A36B01C3707E/workflow/workflow.py", line 27, in <module>  

import cPickle  

ModuleNotFoundError: No module named 'cPickle'

this recently has come to my attention, since it suddenly stopped working obviously. Does alfred-convert require cPickle to be installed on System?

Thanks.

deanishe commented 6 years ago

Does alfred-convert require cPickle to be installed on System?

No. It's a built-in Python library. At a guess, I'd say either you or something else has fucked up your OS by replacing parts of it.

Which version of MacOS are you on, and what do you see when you run /usr/bin/python in a shell.

For example:

Python 2.7.10 (default, Oct 23 2015, 19:19:21)
[GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.59.5)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>
Canorus commented 6 years ago

I'm using macOS 10.12.6, python 3.6.3

Python 3.6.3 (default, Nov 15 2017, 15:38:54) 
[GCC 4.2.1 Compatible Apple LLVM 8.1.0 (clang-802.0.38)] on darwin
Type "help", "copyright", "credits" or "license" for more information.

seems like python3 was the cause of problem, it works on my MacBook which runs python 2.7.10

Python 2.7.10 (default, Feb  7 2017, 00:08:15) 
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.34)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
deanishe commented 6 years ago

I'm using macOS 10.12.6, python 3.6.3

The workflow isn't compatible with Python 3.

The root problem is that you've replaced /usr/bin/python (a part of MacOS) with another, incompatible version of Python.

Certainly, a lot of Alfred workflows will no longer work, and you may have broken a lot of other stuff, too.