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

value error on minimal tagging example #39

Closed
suchow opened this issue Mar 26, 2015 · 3 comments
Closed

value error on minimal tagging example #39

suchow opened this issue Mar 26, 2015 · 3 comments

Comments

@suchow
Copy link
Contributor

suchow commented Mar 26, 2015

I created a minimal script:

import spacy.en
nlp = spacy.en.English()
tokens = nlp(u"The cow jumped over the moon.", tag=True, parse=False)

And then ran it under Python 2.7.9, spaCy 0.70, OS X 10.10.3.

It crashes, giving the following error:

❯ python test_spacy.py
Traceback (most recent call last):
  File "test_spacy.py", line 2, in <module>
    nlp = spacy.en.English()
  File "/Users/jordansuchow/.virtualenvs/spacy/lib/python2.7/site-packages/spacy/en/__init__.py", line 76, in __init__
    tok_rules, prefix_re, suffix_re, infix_re = read_lang_data(tok_data_dir)
  File "/Users/jordansuchow/.virtualenvs/spacy/lib/python2.7/site-packages/spacy/util.py", line 16, in read_lang_data
    tokenization = json.load(file_)
  File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py", line 290, in load
    **kw)
  File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py", line 338, in loads
    return _default_decoder.decode(s)
  File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 366, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 382, in raw_decode
    obj, end = self.scan_once(s, idx)
ValueError: Expecting property name: line 567 column 1 (char 15406)
@syllog1sm
Copy link
Contributor

There's a trailing comma in the specials.json data file that's in the version on pip. This is fixed in the next pip release.

For now, if you run

$ python -m spacy.en.download all

The correct data will be downloaded.

@suchow
Copy link
Contributor Author

suchow commented Mar 26, 2015

Perfect, thanks.

@suchow suchow closed this as completed Mar 26, 2015
@lock
Copy link

lock bot commented May 9, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators May 9, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants