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

incompatible pickle with Python3 #6

Open
JuliaVB opened this issue Sep 18, 2018 · 0 comments
Open

incompatible pickle with Python3 #6

JuliaVB opened this issue Sep 18, 2018 · 0 comments

Comments

@JuliaVB
Copy link

JuliaVB commented Sep 18, 2018

Hi,
I am trying to run the code using python 3.6 on macOs High Sierra.

I am getting the following error. Are you planning on releasing python3 compatible files?

Thank you

`---------------------------------------------------------------------------
UnicodeDecodeError Traceback (most recent call last)
/usr/local/Cellar/python3/3.6.4_2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/sklearn/externals/joblib/numpy_pickle.py in _unpickle(fobj, filename, mmap_mode)
507 try:
--> 508 obj = unpickler.load()
509 if unpickler.compat_mode:

/usr/local/Cellar/python3/3.6.4_2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/pickle.py in load(self)
1049 assert isinstance(key, bytes_types)
-> 1050 dispatchkey[0]
1051 except _Stop as stopinst:

/usr/local/Cellar/python3/3.6.4_2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/pickle.py in load_short_binstring(self)
1225 data = self.read(len)
-> 1226 self.append(self._decode_string(data))
1227 dispatch[SHORT_BINSTRING[0]] = load_short_binstring

/usr/local/Cellar/python3/3.6.4_2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/pickle.py in _decode_string(self, value)
1165 else:
-> 1166 return value.decode(self.encoding, self.errors)
1167

UnicodeDecodeError: 'ascii' codec can't decode byte 0xbf in position 0: ordinal not in range(128)

The above exception was the direct cause of the following exception:

ValueError Traceback (most recent call last)
in ()
----> 1 detector.detector('./im/selfie.jpeg')

~/Dropbox (Codec London)/codec-data_science/Clustering/InstagramImageClusteringExperiment_JVB_P/human_detector/object_detector/detector.py in detector(filename)
38 downscale = 1.25
39
---> 40 clf = joblib.load(os.path.join(model_path, 'svm.model'))
41
42 #List to store the detections

/usr/local/Cellar/python3/3.6.4_2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/sklearn/externals/joblib/numpy_pickle.py in load(filename, mmap_mode)
576 return load_compatibility(fobj)
577
--> 578 obj = _unpickle(fobj, filename, mmap_mode)
579
580 return obj

/usr/local/Cellar/python3/3.6.4_2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/sklearn/externals/joblib/numpy_pickle.py in _unpickle(fobj, filename, mmap_mode)
521 'This feature is not supported by joblib.')
522 new_exc.cause = exc
--> 523 raise new_exc
524 # Reraise exception with Python 2
525 raise

ValueError: You may be trying to read with python 3 a joblib pickle generated with python 2. This feature is not supported by joblib.`

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

1 participant