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

binary model not compatible with python3 #2

Open
WladimirSidorenko opened this issue Oct 18, 2015 · 0 comments
Open

binary model not compatible with python3 #2

WladimirSidorenko opened this issue Oct 18, 2015 · 0 comments
Assignees
Labels

Comments

@WladimirSidorenko
Copy link
Owner

Delivered pre-built model cannot be unpacked when using python3.

Steps:

  1. Install and activate python3 using virtualenv:
virtualenv -p python3.3 --no-site-packages venv-3.3
cd venv-3.3/
. bin/activate
  1. Install dsegmenter in new environment:
git clone git@github.com:WladimirSidorenko/DiscourseSegmenter.git
pip install -r DiscourseSegmenter/requirements.txt -e DiscourseSegmenter/
  1. Test installed package on file:
discourse_segmenter bparseg segment DiscourseSegmenter/examples/bpar/maz-8727.exb.bpar
  1. Current output:
Traceback (most recent call last):
  File "/home/sidorenko/sandbox/venv-3.3/bin/discourse_segmenter", line 6, in <module>
    exec(compile(open(__file__).read(), __file__, 'exec'))
  File "/home/sidorenko/sandbox/venv-3.3/DiscourseSegmenter/scripts/discourse_segmenter", line 318, in <module>
    main(sys.argv[1:])
  File "/home/sidorenko/sandbox/venv-3.3/DiscourseSegmenter/scripts/discourse_segmenter", line 307, in main
    segmenter = BparSegmenter(a_model = args.model)
  File "/home/sidorenko/sandbox/venv-3.3/DiscourseSegmenter/dsegmenter/bparseg/bparsegmenter.py", line 373, in __init__
    self._update_segmenter(a_model)
  File "/home/sidorenko/sandbox/venv-3.3/DiscourseSegmenter/dsegmenter/bparseg/bparsegmenter.py", line 550, in _update_segmenter
    self.model = joblib.load(a_model)
  File "/home/sidorenko/sandbox/venv-3.3/lib/python3.3/site-packages/sklearn/externals/joblib/numpy_pickle.py", line 425, in load
    obj = unpickler.load()
  File "/usr/lib64/python3.3/pickle.py", line 840, in load
    dispatch[key[0]](self)
  File "/usr/lib64/python3.3/pickle.py", line 985, in load_short_binstring
    value = str(data, self.encoding, self.errors)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xb1 in position 1: ordinal not in range(128)
  1. Expected:
    Segmented file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant