Closed eyz closed 7 years ago
Can you paste the exact query? You have a semicolon after xyz?
Nicole, please see the updated error. If that doesn't help identify the parser issue then I can try to isolate an example for you. This was only the output error I posted so far.
Are you executing these queries from a file? Using cycli --filename queries.txt
or something?
My guess is that is the case. From main.py:
if self.filename: queries = self.filename.read() queries = queries.split(";")[:-1]
As it doesn't pay any attention to context (eg, quoted string), it looks like a semi-colon anywhere other than the end of a statement will break things.
That's why I asked if he was using the --filename
param. That code is only executed if you're reading queries from a file. That should be fixed regardless, but I'm trying to figure out if it's another bug.
Yes, @nicolewhite, I have just confirmed that we use the -f flag to read cypher from a file.
cycli -h neo4j -f "${CYPHER_TEMP}"
Okay cool. I will fix this soon.
When creating a node with a semicolon in the property value, the following error was produced. Perhaps the semicolon parsing isn't always being skipped inside quotes?
Please note that the troublesome code is rendered as a left arrow in this Github issue, as that is the HTML entity where the problematic semicolon parsing occurs. View source below to see the semicolon in context, or the attached screenshot of the code here -
MATCH (mno:ghi) where mno.id = "mno" CREATE (def:ghi{id:"jkl",stu:"xyz ⇐ Unexpected end of input: expected '\', ANY or '"' (line 4, column 131 (offset: 287)) "CREATE (def:ghi{id:"jkl",stu:"xyz ⇐" ^
I tried to redact the actual cypher, and hopefully that doesn't obfuscate it too much. I can add another case where this also happened in a where clause as well if that helps.