question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

AssertionError on multiple dots

See original GitHub issue

When there are more than 5 consecutive dots in a string, Spacy throws AssertionError. 5 or less dots are ok.

from spacy.en import English
nlp = English()
nlp(u'some.....dots')
out: some.....dots
nlp(u'some......dots')

  File "python2.7/site-packages/spacy/language.py", line 225, in __call__
    tokens = self.tokenizer(text)
  File "spacy/tokenizer.pyx", line 132, in spacy.tokenizer.Tokenizer.__call__ (spacy/tokenizer.cpp:4835)
  File "spacy/tokenizer.pyx", line 159, in spacy.tokenizer.Tokenizer._tokenize (spacy/tokenizer.cpp:5409)
  File "spacy/tokenizer.pyx", line 231, in spacy.tokenizer.Tokenizer._attach_tokens (spacy/tokenizer.cpp:6444)
  File "spacy/tokens/doc.pyx", line 282, in spacy.tokens.doc.Doc.push_back (spacy/tokens/doc.cpp:8356)
AssertionError

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:2
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
gojomocommented, Aug 23, 2016

I got 0.100.7 from the conda channel recommended in the Spacy docs a couple days ago, so expected that would be the latest/recommended version. Should whatever’s at PyPI be generally preferred?

0reactions
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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Python argparse AssertionError - Stack Overflow
The underlying cause of the problem is an assert check within the Python code that only occurs when Python attempts to break the...
Read more >
Python's assert: Debug and Test Your Code Like a Pro
The AssertionError immediately points you to the specific problem: .radius has unexpectedly changed to a negative number. You have to figure out ...
Read more >
AssertionError in Python - Javatpoint
Since AssertionError is an inheritance class of the Exception class, there are two potential ways to handle this error. First, the user handles...
Read more >
7. Simple statements — Python 3.11.1 documentation
One leading dot means the current package where the module making the import exists. Two dots means up one package level. Three dots...
Read more >
Programming With Assertions - Oracle Help Center
When an AssertionError is generated by an assert statement in which Expression2 is absent, why isn't the program text of the asserted condition...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found