Showing results for 
Search instead for 
Did you mean: 

Local rdf file import error


Dear All:
I'm learning rdf import from Importing RDF Data - Neosemantics ,
when I use: CALL n10s.rdf.import.fetch("","Turtle"); --it's OK,but I download and import "nsmntx.ttl" locally, it fails:
CALL n10s.rdf.import.fetch("file:///D:nsmntx.ttl","Turtle"); --shows "/E:nsmntx.ttl (No such file or directory)"
then I try: CALL n10s.rdf.import.fetch("file://D:nsmntx.ttl","Turtle"); --shows "Error at index 0 in: "nsmntx.ttl" "
I wonder what went wrong.
Thanks for your help!



Hi @joylix

How about this one.

CALL n10s.rdf.import.fetch("file:///D:\\nsmntx.ttl","Turtle");

Thank you Koji, but this still doesn't work.
I use neosemantics and neo4j 4.2.4, with http://localhost:7474/browser/.
Can someone else import local ttl files successfully?

Hi @joylix

This command works good.

CALL n10s.rdf.import.fetch("file:///C:/Users/koji/nsmntx.ttl","Turtle");

Maybe this one will work.

CALL n10s.rdf.import.fetch("file:///D:/nsmntx.ttl","Turtle");

My Env:

Windows 10 Pro (on Parallels Desktop on macOS)
Neo4j Desktop 1.4.5
Neo4j 4.2.5


Hi Koji
My Env is: Windows 10 Pro 20H2, wsl2,
Neo4j 4.2.4
But it never worked. I want to try Neo4j 4.2.5 to see if it works


My Windows 10 on the macOS Big Sur.


I have tried all sorts of things, but I still cannot successfully import local ttl format RDF data. I tried the Neo4j Community versions 4.2.5 and 4.2.6, both under OpenJDK 11 and OpenJDK 14. it's still the same result and error message.
Can someone help me find out what went wrong? Thank you very much!

Node Link

HI joylix,

Pls try this CALL n10s.rdf.import.fetch("file:\\D:\\nsmntx.ttl","Turtle");

It works in my Env

Hope it should work!!!

Dear naveenkumar:
I try it, but it still not work
CALL n10s.rdf.import.fetch("file:\D:\nsmntx.ttl","Turtle");
--"\D:\nsmntx.ttl (No such file or directory)"
CALL n10s.rdf.import.fetch("file://D:\nsmntx.ttl","Turtle");
--"Error at index 0 in: "\nsmntx.ttl""

Dear joylix

Make sure that your file is in exact directory and try with double slashes the exact format of what i have shared

CALL n10s.rdf.import.fetch("file:\\D:\\nsmntx.ttl","Turtle");

Thanks !!!

Dear sir,
I tried a lot of things, including the way you said, but it didn't work .
I'm sure that the file is in exact directory : D:/nsmntx.ttl
when Try:
CALL n10s.rdf.import.fetch("file:\D:\nsmntx.ttl","Turtle");
or CALL n10s.rdf.import.fetch("file:\D:\nsmntx.ttl","Turtle");
It shows--"\D:\nsmntx.ttl (No such file or directory)"

when use: CALL n10s.rdf.import.fetch("file://D:/nsmntx.ttl","Turtle");
or : CALL n10s.rdf.import.fetch("file://D://nsmntx.ttl","Turtle");
It seems the file has been read, but It feed back:
terminationStatus "KO" ; triplesLoaded 0; extraInfo "D"
when use: CALL n10s.rdf.import.fetch("file://D:\nsmntx.ttl","Turtle");
-- "Error at index 0 in: "\nsmntx.ttl""
when use: CALL n10s.rdf.import.fetch("file:///D:/nsmntx.ttl","Turtle");
-- "/D:/nsmntx.ttl (No such file or directory)""

Node Link

Dear joylix ,

You have initialized graph config?

CALL n10s.graphconfig.init();
CREATE CONSTRAINT n10s_unique_uri ON (r:Resource) ASSERT r.uri IS UNIQUE;

and try the function which was able to read

 CALL n10s.rdf.import.fetch("file://D://nsmntx.ttl","Turtle");

Yes, I do, but as you can see, it still doesn't work.

Hi, I'm not a Windows user myself but there's a note in the manual on how to construct urls for local windows files.

I copy it here:

If you’re working on a windows machine and want to access an RDF file stored on your drive, here’s the syntax for paths:
CALL n10s.rdf.import.fetch("file:///D:\\Data\\some_rdf_file.rdf", "RDF/XML");

Hope this helps.

PS: It would be great to hear from windows users on whether this works or alternative syntaxes are preferable. I'd like to add this info to the manual.



So far, I have not been able to import successfully in the Windows 10 WSL2 environment. None of the foregoing methods will do. My WSL2 is using Ubuntu 20.04.2 LTS (GNU/Linux 4.19.104-microsoft standard x86_64)
But I re-uploaded this local file nsmntx.ttl to the file server, then use fetch "http://....nsmntx.ttl " to import, it works well.

Node Link

I am also facing the same issue when trying to load a Turtle file from my file system (using Windows) in Neo4j web console. Tried all possible syntaxes and everything fails (same errors as the original poster)