Python-3.12 Neo4J Load from local CSV file hits "Invalid URL" error

I run a single-instance community container on local k8s. I am trying to load local CSV file from a python module:

CSV_PATH = "file:///home/me/data/Project/shops.csv"
with driver.session(database="neo4j") as session:
    query = f"""
    LOAD CSV WITH HEADERS
    FROM '{CSV_PATH}' AS shops
    MERGE (h:Hospital {{id: toInteger(shops.shop_id),
        name: shops.shop_name,
        state_name: shops.shop_state}});
    """
    _ = session.run(query, {})

Run the code from /usr/src/Project/utils/:

$ pipenv run python Imports.py

Error:

2025-03-23 15:21:22 [WARNING]: {code: Neo.ClientError.Statement.ExternalResourceFailed} {message: Invalid URL '/usr/src/Project/data/Project/shops.csv': no protocol: /usr/src/Project/data/Project/shops.csv ()}, retrying in 10 seconds...

I have followed neo4j - Neo.ClientError.Statement.ExternalResourceFailed - Stack Overflow to set dbms.security.allow_csv_import_from_file_urls to true but to no avail.

This is a setting for when you want to fetch from inside the database

Try this:

from neo4j import GraphDatabase

# Connection details
URI = "neo4j://localhost:7687"  # Replace with your Neo4j server URI
USERNAME = "neo4j"              # Replace with your username
PASSWORD = "password"           # Replace with your password

# File path - Neo4j server needs access to this location
CSV_PATH = "file:///home/me/data/Project/shops.csv"

# Connect to the Neo4j database
driver = GraphDatabase.driver(URI, auth=(USERNAME, PASSWORD))

# Execute the query
with driver.session(database="neo4j") as session:
    query = f"""
    LOAD CSV WITH HEADERS FROM '{CSV_PATH}' AS row
    MERGE (h:Hospital {{id: toInteger(row.shop_id), name: row.shop_name, state: row.shop_state}});
    """
    result = session.run(query, {})
    
# Close the driver connection
driver.close()

There is only 1 tiny change in your reply which is the URI from bolt to neo4j!?! Doesn't help at all!!!

Is localhost the address of your database? this was a placeholder ...

No, this is not the show-stopper.