cognipy icon indicating copy to clipboard operation
cognipy copied to clipboard

ParseException for `K9s is something.`

Open hans-d opened this issue 2 years ago • 0 comments

Using

onto = Ontology("cnl/file","hello.encnl",stop_on_error=True)

Works with

%%writefile hello.encnl
Kas is something.

Errors with

%%writefile hello.encnl
K9s is something.
---------------------------------------------------------------------------
ParseException                            Traceback (most recent call last)
Input In [3], in <cell line: 1>()
----> 1 onto = Ontology("cnl/file","hello.encnl",stop_on_error=True)

File /opt/conda/lib/python3.10/site-packages/cognipy/ontology.py:103, in Ontology.__init__(self, source, arg, verbose, evaluator, graph_attribute_formatter, stop_on_error)
    101 self._uid = cognipy_create()
    102 if source == "cnl/file":
--> 103     cognipy_call(self._uid, "LoadCnl", arg, loadAnnotations,
    104                  modalCheck, passParamsAsCnl, stop_on_error)
    105 elif source == "cnl/string":
    106     cognipy_call(self._uid, "LoadCnlFromString", arg,
    107                  loadAnnotations, modalCheck, passParamsAsCnl, stop_on_error)

File /opt/conda/lib/python3.10/site-packages/cognipy/interop.py:76, in cognipy_call(uid, cmd, *args)
     74 js="\r\n".join(ja)
     75 if fl.strip()=='@exception':
---> 76     raise translate_exception(json.loads(js))
     77 return json.loads(js)

ParseException: {'Errors': [{'Line': 0, 'Column': 0, 'Pos': 0, 'Context': 'K9s is something.\n', 'Hint': 'K^9s is something.'}]}

(running in a jupyther/minimal image with mono added)

hans-d avatar Jun 13 '22 21:06 hans-d