OnroerendErfgoed / skosprovider_rdf

Skosprovider implementation backed by RDF
http://skosprovider-rdf.readthedocs.org
MIT License
2 stars 4 forks source link

Update to rdflib 5.0.0 #74

Closed Wim-De-Clercq closed 4 years ago

Wim-De-Clercq commented 4 years ago
../../.venv/lib/python3.6/site-packages/skosprovider_rdf/utils.py:45: in rdf_dumper
    return _rdf_dumper(provider, None)
../../.venv/lib/python3.6/site-packages/skosprovider_rdf/utils.py:94: in _rdf_dumper
    _add_c(graph, provider, id)
../../.venv/lib/python3.6/site-packages/skosprovider_rdf/utils.py:158: in _add_c
    _add_labels(graph, c, subject)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

graph = <Graph identifier=Nccb295e0145d45bfb868a675c5a57238 (<class 'rdflib.graph.Graph'>)>
c = Concept('1')
subject = rdflib.term.URIRef('https://id.erfgoed.net/thesauri/wetgeving/1')

    def _add_labels(graph, c, subject):
        for l in c.labels:
>           predicate = URIRef(SKOS + l.type)
E           TypeError: unsupported operand type(s) for +: 'ClosedNamespace' and 'str'

../../.venv/lib/python3.6/site-packages/skosprovider_rdf/utils.py:196: TypeError

Maximum workable rdflib is 4.2.2

I think the new way would be:

SKOS[l.type]