Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in Getting Started Guide: prefixes is Not Defined #42

Open
manabian- opened this issue Dec 17, 2024 · 0 comments
Open

Error in Getting Started Guide: prefixes is Not Defined #42

manabian- opened this issue Dec 17, 2024 · 0 comments

Comments

@manabian-
Copy link

Issue

When running the code from the Getting Started section of the RDFLib-Neo4j documentation, the following NameError is encountered:

NameError Screenshot

https://github.com/neo4j-labs/rdflib-neo4j/blob/master/docs/modules/ROOT/pages/gettingstarted.adoc?plain=1#L42C1-L46C41

---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-2-0498e7fe3371> in <cell line: 15>()
     14 # Define your custom mappings & store config
     15 config = Neo4jStoreConfig(auth_data=auth_data,
---> 16                           custom_prefixes=prefixes,
     17                           handle_vocab_uri_strategy=HANDLE_VOCAB_URI_STRATEGY.IGNORE,
     18                           batching=True)

NameError: name 'prefixes' is not defined

Error Details Screenshot

Solution

The NameError occurs because the prefixes variable is not defined before it is used in the Neo4jStoreConfig. To fix this issue, define the prefixes dictionary with the necessary namespace mappings. Add the following code snippet before configuring Neo4jStoreConfig:

prefixes = {
    "skos": "http://www.w3.org/2004/02/skos/core#",
    # Add other prefixes as needed
}

Solution Screenshot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant