Home > Back-end >  About the Pattern of errors in the import RuntimeError: generator raised StopIteration
About the Pattern of errors in the import RuntimeError: generator raised StopIteration

Time:09-29

I download the pattern, which is in the CMD download


When used in Pycharm import and error


Below is the error content
 
Traceback (the most recent call last) :
The File "C: \ Users \ zyx \ Anaconda3 \ lib \ site - packages, the pattern, the text, just set py", line 609, in _read
Raise StopIteration
StopIteration

The above exception was The direct cause of The following exception:

Traceback (the most recent call last) :
File "C:/Users/at/PycharmProjects/not/TA/standardization process and understand the text/text/Pos. Py", line 12, the in & lt; module>
Tagged_sent=tag (sentence)
The File "C: \ Users \ zyx \ Anaconda3 \ lib \ site - packages, the pattern, the text, en \ set py", line 188, in the tag
For what in the parse (s, tokenize, True, False, False, False, encoding, * * kwargs). The split () :
The File "C: \ Users \ zyx \ Anaconda3 \ lib \ site - packages, the pattern, the text, en \ set py", line 169, in the parse
Return parser. Parse (s * args, * * kwargs)
The File "C: \ Users \ zyx \ Anaconda3 \ lib \ site - packages, the pattern, the text, just set py", line 1172, in the parse
S [I]=self. Find_tags (s [I], * * kwargs)
The File "C: \ Users \ zyx \ Anaconda3 \ lib \ site - packages, the pattern, the text, en \ set py", line 114, in find_tags
Return _Parser. Find_tags (self, tokens, * * kwargs)
The File "C: \ Users \ zyx \ Anaconda3 \ lib \ site - packages, the pattern, the text, just set py", line 1113, in find_tags
Lexicon=kwargs. Get (" lexicon ", the self. The lexicon or {}),
The File "C: \ Users \ zyx \ Anaconda3 \ lib \ site - packages, the pattern, the text, just set py", line 376, in __len__
Return the self. _lazy (" __len__ ")
The File "C: \ Users \ zyx \ Anaconda3 \ lib \ site - packages, the pattern, the text, just set py", line 368, in _lazy
The self. The load ()
The File "C: \ Users \ zyx \ Anaconda3 \ lib \ site - packages, the pattern, the text, just set py", line 625, the load in
Dict. Update (self, (x.s plit (" ") for x in _read [: 2] (self. _path) if len (x.s plit (" ")) & gt; 1))
The File "C: \ Users \ zyx \ Anaconda3 \ lib \ site - packages, the pattern, the text, just set py", line 625, in & lt; Genexpr>
Dict. Update (self, (x.s plit (" ") for x in _read [: 2] (self. _path) if len (x.s plit (" ")) & gt; 1))
RuntimeError: generator raised StopIteration


I am very helpless, found two days didn't solve the problem, it should not be placed on Java edition piece, but I can't find the Python plate I don't have better choice
Here are my Python code Python code is correct, the others have been installed on the pattern of the computer can run right

 import me 
From the pattern. En import tag
If __name__=="__main__ ':
Sentence='The brown fox is quick and he is jumping over The lazy dog'
Tokens=me. Word_tokenize (sentence)
Tagged_sent=me. Pos_tag (tokens, tagset='universal')
Print (tagged_sent)
Tagged_sent=tag (sentence)
Print (tagged_sent)


This problem has been bothering me for a long time hope someone can help me
Thank you for

CodePudding user response:

Can hang in a scripting language directory

CodePudding user response:

reference 1/f, mice twisting knife streets looking for the cat's reply:
can hang in a scripting language directory
eldest brother specific how to operate

CodePudding user response:

https://zhuanlan.zhihu.com/p/96669969
  • Related