You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
--- Logging error ---
Traceback (most recent call last):
File "/anaconda3/lib/python3.7/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 "", line 12, in getInfinitive
inf = lemma(verb_token)
File "/anaconda3/lib/python3.7/site-packages/pattern/text/init.py", line 2172, in lemma
self.load()
File "/anaconda3/lib/python3.7/site-packages/pattern/text/init.py", line 2127, in load
for v in _read(self._path):
RuntimeError: generator raised StopIteration
Hello @DHOFM, I found out, that the Error only appears after the second time of processing a script. When I restart the kernel, there is no Error. I did the fixing you explained without success. I understood your approach of #282 like this:
Replace the following lines 608 and 609 of /anaconda3/lib/python3.7/site-packages/pattern/text/__init__.py:
@vizzerdrix55 : Yes - that is what works for me, but I am not on Anaconda, I am on Mac OS but I do not think thats the difference. I use pattern3 for python3 so my path is .../lib/python3.7/site-packages/pattern3/text
What also is different in your code is you do not return only in an Exception so your code is:
@DHOFM You are right. With the colon at the right place, the Error StopIteration doesn't appear anymore. Now I receive IndexError after the second time I run the script. I created a new Issue #284
Activity
DHOFM commentedon Aug 5, 2019
This is a strange coincidence I had the same problem today. See my post here, how to fix it :)
#282
vizzerdrix55 commentedon Aug 6, 2019
Hello @DHOFM, I found out, that the Error only appears after the second time of processing a script. When I restart the kernel, there is no Error. I did the fixing you explained without success. I understood your approach of #282 like this:
Replace the following lines 608 and 609 of
/anaconda3/lib/python3.7/site-packages/pattern/text/__init__.py:with
DHOFM commentedon Aug 6, 2019
@vizzerdrix55 : Yes - that is what works for me, but I am not on Anaconda, I am on Mac OS but I do not think thats the difference. I use pattern3 for python3 so my path is .../lib/python3.7/site-packages/pattern3/text
What also is different in your code is you do not return only in an Exception so your code is:
and my example is:
vizzerdrix55 commentedon Aug 6, 2019
@DHOFM You are right. With the colon at the right place, the Error StopIteration doesn't appear anymore. Now I receive IndexError after the second time I run the script. I created a new Issue #284