cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Handling neo4j error

WHILE IMPORTING sss.csv file in NEO4J, this error appear.

Neo.ClientError.Statement.SyntaxError
Neo.ClientError.Statement.SyntaxError: Invalid input 's': expected four hexadecimal digits specifying a unicode character (line 2, column 39 (offset: 60))
"LOAD CSV WITH HEADERS FROM 'file:C:\Users\SIEVA-2019.Neo4jDesktop\neo4jDatabases/sss.csv' AS line"

PLEASE, HELP ME HANDLE THIS.

4 REPLIES 4

WHILE IMPORTING sss.csv file in NEO4J, this error appear.

*Neo.ClientError.Statement.SyntaxError*
Neo.ClientError.Statement.SyntaxError: Invalid input 's': expected four hexadecimal digits specifying a unicode character (line 2, column 39 (offset: 60))
"LOAD CSV WITH HEADERS FROM 'file:C:\Users\SIEVA-2019.Neo4jDesktop\neo4jDatabases/sss.csv' AS line"

PLEASE, HELP ME HANDLE THIS.

COMMAND USED:

USING PERIODIC COMMIT
LOAD CSV WITH HEADERS FROM 'file:C:\Users\SIEVA-2019.Neo4jDesktop\neo4jDatabases/sss.csv' AS line
CREATE (:Track { TrackId: line.Id, Name: line.Track, Length: line.Length})

It also looks like you are missing the number of records to periodically commit.
"USING PERIODIC COMMIT 500"
I've never tried it without a number so I don't know how it would react.

Agree with Mark. The file URL for loading paths, even on windows, should look more like this:

file:///C/path/to/file.csv

Note the use of slashes NOT backslashes, and note the specific use of TRIPLE slash after file: that is not a typo.

More information here:

I think the problem is with the \ in the path. If you change that to match the other /, it should work.
"LOAD CSV WITH HEADERS FROM 'file:///C:/Users/SIEVA-2019.Neo4jDesktop/neo4jDatabases/sss.csv'"