diff --git a/tyto/endpoint/endpoint.py b/tyto/endpoint/endpoint.py index a1bf08b..d86335e 100644 --- a/tyto/endpoint/endpoint.py +++ b/tyto/endpoint/endpoint.py @@ -242,7 +242,10 @@ def is_loaded(self): return bool(self.graph) def load(self): - self.graph.parse(self.path) + if self.path.split('.')[-1] == 'ttl': + self.graph.parse(self.path, format='ttl') + else: + self.graph.parse(self.path) def query(self, ontology, sparql, err_msg): sparql_final = sparql.format(from_clause='') # Because only one ontology per file, delete the from clause