LexPredict / lexpredict-lexnlp

LexNLP by LexPredict
GNU Affero General Public License v3.0
691 stars 175 forks source link

Pickle Error #4

Closed dmnxprss closed 6 years ago

dmnxprss commented 6 years ago

Receiving the following error where any pickle file is loaded _pickle.UnpicklingError: invalid load key, '\x02'

Eg. Line 35 sections.py

mjbommar commented 6 years ago

Hi @dmnxprss , thanks for submitting your issue. We'll get back to you in the next few days, but in the meantime, could you please help out with a few details?

  1. Python version: python -V, please check to make sure if you are in virtualenv/conda
  2. lexnlp version: $ python3 -c "import lexnlp; print(lexnlp.__version__)"
dmnxprss commented 6 years ago

Hey no issues, I'll look into it using 3

dmnxprss commented 6 years ago

Hi @mjbommar, originally i tried import lexnlp.nlp.en.segments.paragraphs with python 2.7 which produced the error

ValueError: unsupported pickle protocol: 4

I then moved to python 3.6 and tried loading this and other pickle files which produced the below error

_pickle.UnpicklingError: invalid load key, '\x02

as for the lexnlp version, i am using 0.1.8

reddalexx commented 6 years ago

Hi @dmnxprss could you please also share pip freeze output?

mjbommar commented 6 years ago

Hello @dmnxprss, we've been unable to reproduce this issue so far on our end. It seems like it was first caused by using the wrong version of Python (we only support Python 3), but the second error suggests you might be opening the file without binary mode (or targeting the wrong file).

If you can produce some sample code for us to review, we might otherwise be able to help.