tenseflow
tenseflow copied to clipboard
"RuntimeError: generator raised StopIteration" from module pattern/text
I got past the previous error by giving in and installing MySQL (via homebrew.) Then I installed the SpaCy English model as directed. But basic CLI usage as in your example fails:
$ python3
Python 3.9.1 (default, Dec 17 2020, 03:56:09)
[Clang 11.0.0 (clang-1100.0.33.17)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from tenseflow import change_tense
>>> change_tense('I will go to the store.', 'past')
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/pattern/text/__init__.py", line 609, in _read
raise StopIteration
StopIteration
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/snej/Code/tenseflow/tenseflow/change_tense.py", line 116, in change_tense
out.append(conjugate(words[-1].text, tense=this_tense, person=person, number=number))
File "/usr/local/lib/python3.9/site-packages/pattern/text/__init__.py", line 2208, in conjugate
b = self.lemma(verb, parse=kwargs.get("parse", True))
File "/usr/local/lib/python3.9/site-packages/pattern/text/__init__.py", line 2172, in lemma
self.load()
File "/usr/local/lib/python3.9/site-packages/pattern/text/__init__.py", line 2127, in load
for v in _read(self._path):
RuntimeError: generator raised StopIteration
>>>