Import in docker on ubuntu not working - Couldn't load the external resource at

Hello, I am having a struggle trying to import a csv file. I'm running neo4j in a docker on ubuntu 20.04.1 and use this command:

sudo docker run
--name testneo4j
-p7474:7474 -p7687:7687
-v $HOME/neo4j/data:/data
-v $HOME/neo4j/conf:/conf
-v $HOME/neo4j/logs:/logs
-v $HOME/neo4j/import:/var/lib/neo4j/import
-v $HOME/neo4j/plugins:/plugins
--env NEO4J_AUTH=neo4j/test
--env NEO4J_dbms_security_allow__csv__import__from__file__urls=true
--env NEO4J_dbms_directories_import="/import"

file sample.csv is under $HOME/neo4j/import (permissions are set ok), then in the browser i do:

LOAD CSV FROM "file:///sample.csv" AS row RETURN row;

and then i get:

Couldn't load the external resource at: file:/import/sample.csv

i went through some threads (found very similar issues but to no avail), articles as well as tried possible solutions and still stuck. Not sure how to trouble shoot it and see nothing of interest in the log file. Any help would be appreciated.


if you change

--env NEO4J_dbms_directories_import="/import"


--env NEO4J_dbms_directories_import=import

as this is the default (i.e note no leading / and also not enclosed in double quotes ) does this address your issue

thanks for pointing that out! it works fine now. Thanks a lot!