I'm working on an ontology and while trying to load it via rdflib I get the following error:
"D:\Interest_Turtle.ttl does not look like a valid URI, perhaps you want to urlencode it?"
The ontology loads fine in the Protege ontology editor from Stanford and the rdf translator (http://rdf-translator.appspot.com/) is able to convert it to JSON so I'm not sure what's wrong.
Any help is appreciated. I've copied the Traceback below.
On a side note, is there a command line tool available to convert RDF/XML or Turtle to JSON?
>>>
Traceback (most recent call last):
File "D:\ontology_rdf.py", line 64, in <module>
main()
File "D:\ontology_rdf.py", line 47, in main
h.load('Interest_Turtle.ttl', format='ttl')
File "build\bdist.win-amd64\egg\rdflib\graph.py", line 1012, in load
self.parse(source, publicID, format)
File "build\bdist.win-amd64\egg\rdflib\graph.py", line 1000, in parse
data=data, format=format)
File "build\bdist.win-amd64\egg\rdflib\parser.py", line 171, in create_input_source
input_source = FileInputSource(file)
File "build\bdist.win-amd64\egg\rdflib\parser.py", line 116, in __init__
system_id = URIRef(file.name, base=base)
File "build\bdist.win-amd64\egg\rdflib\term.py", line 204, in __new__
raise Exception('%s does not look like a valid URI, perhaps you want to urlencode it?'%value)
Exception: D:\Interest_Turtle.ttl does not look like a valid URI, perhaps you want to urlencode it?
rdflib doesn't like TTL but OWL is loading. I need to run some tests to see if things are good.
For TTL:
"No plugin registered for (ttl, <class 'rdflib.parser.Parser'>)"
TRACEBACK:
>>> ================================ RESTART ================================
>>>
Traceback (most recent call last):
File "D:\rdf.py", line 57, in <module>
main()
File "D:\rdf.py", line 39, in main
h.load('D:\Interest_Turtle.ttl', format='ttl')
File "build\bdist.win-amd64\egg\rdflib\graph.py", line 1040, in load
self.parse(source, publicID, format)
File "build\bdist.win-amd64\egg\rdflib\graph.py", line 1035, in parse
parser = plugin.get(format, Parser)()
File "build\bdist.win-amd64\egg\rdflib\plugin.py", line 103, in get
"No plugin registered for (%s, %s)" % (name, kind))
PluginException: No plugin registered for (ttl, <class 'rdflib.parser.Parser'>)