{"record":{"id":"c4fa6aba1611a1e6","repo":"stanfordnlp/CoreNLP","slug":"expected-blank-line-found","errorCode":null,"errorMessage":"Expected blank line, found: ","messagePattern":"Expected blank line, found: ","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"src/edu/stanford/nlp/parser/lexparser/Options.java","lineNumber":1271,"sourceCode":"    genStop = Boolean.parseBoolean(value);\n    line = in.readLine();\n    value = line.substring(line.indexOf(' ') + 1);\n    distance = Boolean.parseBoolean(value);\n    line = in.readLine();\n    value = line.substring(line.indexOf(' ') + 1);\n    coarseDistance = Boolean.parseBoolean(value);\n    line = in.readLine();\n    value = line.substring(line.indexOf(' ') + 1);\n    dcTags = Boolean.parseBoolean(value);\n    line = in.readLine();\n    if ( ! line.matches(\"^nPrune.*\")) {\n      throw new RuntimeException(\"Expected nPrune, found: \" + line);\n    }\n    value = line.substring(line.indexOf(' ') + 1);\n    nodePrune = Boolean.parseBoolean(value);\n    line = in.readLine(); // get rid of last line\n    if (line.length() != 0) {\n      throw new RuntimeException(\"Expected blank line, found: \" + line);\n    }\n  }\n\n  private static final long serialVersionUID = 4L;\n\n} // end class Options\n","sourceCodeStart":1253,"sourceCodeEnd":1278,"githubUrl":"https://github.com/stanfordnlp/CoreNLP/blob/1b7edd19c4d0d7b1f13a2591425b9b60a0b1af7a/src/edu/stanford/nlp/parser/lexparser/Options.java#L1253-L1278","documentation":"Options.readData terminates its options section by requiring a blank line; if the final line read is non-empty it throws RuntimeException('Expected blank line, found: ...'). This indicates the serialized options section does not have the expected layout, so the rest of the stream would be misparsed.","triggerScenarios":"Loading a parser model whose Options text section lacks the trailing blank line separator — usually because the file was produced by a different format version, truncated, or hand-edited.","commonSituations":"Version mismatch between model file and parser library, corrupted download, or manually concatenating/modifying grammar text files.","solutions":["Replace the model file with the official one matching your parser version.","Regenerate the grammar/serializer output with the current library.","Add the missing blank line if the file was hand-edited (blank line must terminate the options section).","Verify file integrity (size/checksum) against a clean download."],"exampleFix":"// before\ncoarseDistance true\ndcTags false\nnPrune false\nGENERALOPTIONS\n// after (blank line before next section)\ncoarseDistance true\ndcTags false\nnPrune false\n\nGENERALOPTIONS","handlingStrategy":"validation","validationCode":"String text = Files.readString(modelPath);\n// options section must end with a blank line before the next section marker\nif (!text.contains(\"\\n\\n\")) System.err.println(\"Warning: options section may be missing its terminating blank line\");","typeGuard":null,"tryCatchPattern":"try {\n  parser = LexicalizedParser.loadModel(path);\n} catch (RuntimeException e) {\n  if (e.getMessage().startsWith(\"Expected blank line\")) {\n    throw new IOException(\"Malformed model file (missing section separator): \" + path, e);\n  }\n  throw e;\n}","preventionTips":["Use intact, version-matched model files; avoid manual edits.","Keep the trailing blank line when regenerating text-format serializer output.","Re-download rather than patch corrupted files."],"tags":["model-loading","file-format","parser"],"backgroundTag":"schema-validation-failed","analyzedSha":"1b7edd19c4d0d7b1f13a2591425b9b60a0b1af7a","analyzedAt":"2026-09-10T02:24:07.274Z","contentChangedAt":"2026-09-10T02:24:07.274Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}