-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SockWrap: "unpack requires a string argument of length 8" #28
Comments
something like that. i wonder if the java process is just crashing. could you save the data file being processed, and the script you're running, that reproduces the error? |
Unfortunately the script I'm running doesn't actually reproduce the error on the same input. The trimmed down version (which replicates the parts that use the wrapper) is as follows: from stanford_corenlp_pywrapper import CoreNLP
filenames = ['input']
ss = CoreNLP(mode='coref', corenlp_jars=['/home/ayrton/corenlp/stanford-corenlp-full-2015-04-20/*'])
for filename in filenames:
f = open(filename)
text = f.read()
f.close()
print "Processing {filename}".format(filename=filename)
jdoc = ss.parse_doc(text,raw=False) # This is where it crashes The input it crashed on is:
The full program takes its input from a redis queue and has processed at most ~600 documents of varying lengths before crashing with |
ok. state dependence is scary. if you restart the server on the On Tue, Jul 7, 2015 at 11:28 AM, Ayrton Massey [email protected]
|
Right now I'm doing this: import struct
...
try:
jdoc = ss.parse_doc(text,raw=False)
except struct.error:
continue To bypass the As far as I know, this just causes me to lose the data from the document that caused the exception and subsequent documents process fine - but as I said, I'd need to leave it running and watch the logs to confirm that it's happened & the process has recovered. |
ok. would be good to know if the python wrapper decides to restart the process after the bad one happens. another idea, if there's weird state dependence going on, you could try just reparsing it and maybe it will work. but maybe it wont. sigh. also apart from the root cause we need the following improvements
|
Left the process running overnight, and here's a relevant portion of the log:
What you're seeing there is that it tries to process a document, fails due to I haven't made any changes to the wrapper, so that happens by default. |
I've noticed this error a couple of times since switching to the new branch. Here's the server log of the exception:
I've taken a look at the code and I'm guessing the server isn't sending enough bytes in response? I'm not sure if that's caused by me throwing too much at it, or something to do with the new release.
The text was updated successfully, but these errors were encountered: