I have a json file on this path: C:\Users\Joao\Desktop\ProjetoFinal8150133\DadosExtraidos\new.json
When i try to invoque:
in Neo4j, it says:
"invalid input 's':expected four hexadecimal digits specifying a unicode character(line 1, column 34(offset: 33))
What is wrong?
Thank you all and stay safe
Solved! Go to Solution.
I had the same error, so I tried to change all \ in the path to / - and that worked, but I got an another error instead:
"Failed to invoke procedure
apoc.load.jsonArray: Caused by: java.lang.RuntimeException: Import from files not enabled, please set apoc.import.file.enabled=true in your apoc.conf"
In the documents (https://neo4j.com/docs/labs/apoc/current/config/) I found a bunch of parameters that can be set in apoc.conf, but I didn't have that file so I just tried to create it with that parameter set to true. After a complete restart it worked.
(Now I have another error, but I think it's related to the json structure)
I hope this helps you
It should be located in the same folder as neo4j.conf, i.e c:/****/conf/apoc.conf
But since every database has it's own configuration, you have to copy the file (or create) to all databases that need that functionality.
Easiest are probably to do what I did, I copied it to all the folders containing neo4j.conf that I could find.
I think that if you manage neo4j.conf from within the program, you only manage that particular database. So you need to manage each database that you need this functionality on.
I actually created a file with only one row , apoc.import.file.enabled=true , and named it apoc.conf
Then I put it manually into the configuration folders.
For me the paths look like:
Please keep the file in import folder. By default file need to to placed in the import forlder of respective DB else you need to change the configuration file. Please visit https://neo4j.com/docs/labs/apoc/current/import/load-json/ for reference
You don't need '///C:' in the path
Just have 'file:/users' in the beginning of the path.
If you, like me, get another error of something like "cannot read the url or file"
you have to put one more line in apoc.conf
That is to allow file import from anywhere on the computer