Closed angoodkind closed 6 years ago
Hi.
If the error is being thrown inconsistently then I suspect it may be due to a timeout from server. Just as soon as I get some time I will look into handling the HTTP requests / responses to and from the CoreNLP server a little more robustly (feel free to contribute). In the mean time, perhaps try specifying a timeout proportional to the size of the text you are annotating e.g python3 -m pynlp --timeout 60000
Please let me know the outcome. Sina
Hi Was having the same issue and I split the long text. I run then the nlp() function on each item of the list. No problem then. Hope this helps.
When running the analysis on a long list of strings, I always get this error after successfully processing a number of strings:
google.protobuf.message.DecodeError: Tag had invalid wire type.
I'm crawling random webpages, so it doesn't seem to matter what the actual contents of the string are. I'm using BeautifulSoup to extract just the text, and it's coerced into a string to ensure it's unicode.
From what I've read about this error, it seems it occurs when trying to write over an existing file. I think it would be ideal if I could reset the CoreNLP server after each iteration.
My current workflow is
In python:
The trackback call is:
On the command line, the CoreNLP server raises the error:
Is there an obvious cause for this error? Alternatively, is there a way to restart the CoreNLP server after each loop within python?