diff --git a/docker_version.txt b/docker_version.txt index 1cc5f65..867e524 100644 --- a/docker_version.txt +++ b/docker_version.txt @@ -1 +1 @@ -1.1.0 \ No newline at end of file +1.2.0 \ No newline at end of file diff --git a/ldd.py b/ldd.py index 9023de5..df9c6c4 100644 --- a/ldd.py +++ b/ldd.py @@ -7,7 +7,7 @@ import os import shutil import re -import urllib +import urllib.parse from rdflib import RDFS class LinkedDataDirector(object): @@ -145,7 +145,7 @@ def get_representation(self, url): # (comment the above one if needed) external_graph = self.load_graph( self.basepath + os.sep + - urllib.unquote_plus( + urllib.parse.unquote_plus( str_o.replace(self.baseurl, "")) + # The following line is for internal testing # (comment the above one if needed) @@ -201,8 +201,8 @@ def __load_graph(file_path): current_graph = rdflib.Graph() try: - current_graph.load(file_path) + current_graph.parse(file_path) except SAXParseException: - current_graph.load(file_path, format="turtle") + current_graph.parse(file_path, format="turtle") - return current_graph + return current_graph \ No newline at end of file diff --git a/oh.py b/oh.py index 242403c..8da6859 100644 --- a/oh.py +++ b/oh.py @@ -70,10 +70,10 @@ def load_graph(ontology_url): current_graph = rdflib.Graph() try: - current_graph.load(ontology_url) + current_graph.parse(ontology_url) except SAXParseException: try: - current_graph.load(ontology_url, format="turtle") + current_graph.parse(ontology_url, format="turtle") except Exception as e: raise e except Exception as e: