IndexError: too many indices for array: array is 0-dimensional, but 1 were indexed #325
Unanswered
fridayorji
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I need help for this error message when I run the following python code on a Windows 10 machine:
config = f"""
[DataSource1]
mappings=rules3_mapping.r2rml.ttl
db_url=mysql+pymysql://root:Kaboyacci3143@localhost/webgov
"""
import kglab
namespaces = {
"rv": "http://WebGov.RiversState.gov.ng/",
}
kg = kglab.KnowledgeGraph(
name = "RV WebGov KG",
namespaces = namespaces
)
kg.materialize(config)
save RDF as ttl
kg.save_rdf("rdf-triples33.ttl")
save RDF as jsonld
kg.save_jsonld("rdf-triples33.jsonld")
The yaml file that's parsed to obtain the rules3_mapping.r2rml.ttl is as follows:
prefixes:
rv: "http://WebGov.RiversState.gov.ng/"
sources:
citizens:
queryFormulation: mysql
query: select * from citizen
mappings:
citizen:
sources: citizens
s: http://WebGov.RiversState.gov.ng/$(citizenid)
po:
- [a, rv:citizen]
- [rv:firstname, $(FirstName)]
- [rv:lastname, $(LastName)]
- [rv:dateofbirth, $(Date_Of_Birth)]
- [rv:sex, $(Sex)]
Can anyone help?
Beta Was this translation helpful? Give feedback.
All reactions