-
Notifications
You must be signed in to change notification settings - Fork 105
Python 3 compatibility issue -- pickle.load(), encoding argument #12
Comments
This breaks for Python 2.7 too. Pickle has no arguments on 2.x $ /usr/local/anaconda2/bin/python cliner predict --txt data/examples/ex_doc.txt --out data/predictions --model models/silver.crf --format i2b2 Removing the encoding argument results in a different error (same command): File "/data/CliNER-master/code/machine_learning/crf.py", line 181, in predict I'm not sure if this is a fault with the code or the encoding in the silver.crf pickle. EDIT: before: clf_byte = bytearray(clf, 'latin1') after: |
Changes to model.py, predict.py, and crf.py have been to address the encoding issues. |
@simthyrearch - for python 3.7 this issue is still there.
|
same here issue is still there |
Line 96 in predict.py:
model = pickle.load(f,encoding = 'latin1')
Error:
TypeError: load() got an unexpected keyword argument 'encoding'
Temporary work-around:
For Python 3, eliminate encoding = [] arg entirely. Documentation specifies that the optional args are only relevant for Python 2.x.
The text was updated successfully, but these errors were encountered: