Skip to content

Commit

Permalink
#77 upgrade rdflib
Browse files Browse the repository at this point in the history
  • Loading branch information
JonasGe committed Aug 4, 2022
1 parent bb7bf5c commit 407f965
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion requirements.txt
@@ -1,4 +1,4 @@
requests==2.26.0
skosprovider==1.1.0
#-e git+https://github.com/OnroerendErfgoed/skosprovider.git#egg=skosprovider
rdflib==5.0.0
rdflib==6.2.0
4 changes: 2 additions & 2 deletions skosprovider_heritagedata/utils.py
Expand Up @@ -92,7 +92,7 @@ def things_from_graph(graph, concept_scheme):
def _create_from_subject_typelist(graph, subject, typelist):
list = []
for p in typelist:
term = SKOS.term(p)
term = SKOS.__getitem__(p)
list.extend(_create_from_subject_predicate(graph, subject, term))
return list

Expand Down Expand Up @@ -151,7 +151,7 @@ def uri_to_graph(uri, **kwargs):
raise ProviderUnavailableException("URI not available: %s" % uri)
if res.status_code == 404:
return False
graph.parse(data=res.content)
graph.parse(data=res.content, format="application/rdf+xml")
# heritagedata.org returns a empy page/graph when a resource does not exists
# (statsu_code 200). For this reason we return False if the graph is empty
if len(graph) == 0:
Expand Down

0 comments on commit 407f965

Please sign in to comment.