my_world2 = World()
on = my_world2.get_ontology("./" + file + ".owl").load() g = my_world2.as_rdflib_graph() g.bind("owl", "<http://www.w3.org/2002/07/owl#>") inter = list(my_world2.sparql(''' SELECT ?p ?q ?g ?s { owl:''' + str(file) + ''' owl:fenilchetonuria ?p . owl:''' + str(file) + ''' owl:diabete ?q . owl:''' + str(file) + ''' owl:lattosio ?g . owl:''' + str(file) + ''' owl:glutine ?s . }''')) row = g.query(inter) ERRORS: "C:\Users\Pasquale Bonasia\Documents\Project Pycharm\Scripts\python.exe" "C:/Users/Pasquale Bonasia/PycharmProjects/pythonProject1/OntoPharma.py" * Owlready2 * Warning: optimized Cython parser module 'owlready2_optimized' is not available, defaulting to slower Python implementation caught a TypeError, retrying call to <class 'owlready2.rdflib_store.TripleLiteRDFlibStore'>.bind without override, see https://github.com/RDFLib/rdflib/issues/1880 for more info Traceback (most recent call last): File "C:\Users\Pasquale Bonasia\Documents\Project Pycharm\lib\site-packages\rdflib\namespace\__init__.py", line 627, in _store_bind return self.store.bind(prefix, namespace, override=override) TypeError: bind() got an unexpected keyword argument 'override' caught a TypeError, retrying call to <class 'owlready2.rdflib_store.TripleLiteRDFlibStore'>.bind without override, see https://github.com/RDFLib/rdflib/issues/1880 for more info Traceback (most recent call last): File "C:\Users\Pasquale Bonasia\Documents\Project Pycharm\lib\site-packages\rdflib\namespace\__init__.py", line 627, in _store_bind return self.store.bind(prefix, namespace, override=override) TypeError: bind() got an unexpected keyword argument 'override' caught a TypeError, retrying call to <class 'owlready2.rdflib_store.TripleLiteRDFlibStore'>.bind without override, see https://github.com/RDFLib/rdflib/issues/1880 for more info Traceback (most recent call last): File "C:\Users\Pasquale Bonasia\Documents\Project Pycharm\lib\site-packages\rdflib\namespace\__init__.py", line 627, in _store_bind return self.store.bind(prefix, namespace, override=override) TypeError: bind() got an unexpected keyword argument 'override' caught a TypeError, retrying call to <class 'owlready2.rdflib_store.TripleLiteRDFlibStore'>.bind without override, see https://github.com/RDFLib/rdflib/issues/1880 for more info Traceback (most recent call last): File "C:\Users\Pasquale Bonasia\Documents\Project Pycharm\lib\site-packages\rdflib\namespace\__init__.py", line 627, in _store_bind return self.store.bind(prefix, namespace, override=override) TypeError: bind() got an unexpected keyword argument 'override' caught a TypeError, retrying call to <class 'owlready2.rdflib_store.TripleLiteRDFlibStore'>.bind without override, see https://github.com/RDFLib/rdflib/issues/1880 for more info Traceback (most recent call last): File "C:\Users\Pasquale Bonasia\Documents\Project Pycharm\lib\site-packages\rdflib\namespace\__init__.py", line 627, in _store_bind return self.store.bind(prefix, namespace, override=override) TypeError: bind() got an unexpected keyword argument 'override' <http://www.w3.org/2002/07/owl#> does not look like a valid URI, trying to serialize this will break. caught a TypeError, retrying call to <class 'owlready2.rdflib_store.TripleLiteRDFlibStore'>.bind without override, see https://github.com/RDFLib/rdflib/issues/1880 for more info Traceback (most recent call last): File "C:\Users\Pasquale Bonasia\Documents\Project Pycharm\lib\site-packages\rdflib\namespace\__init__.py", line 627, in _store_bind return self.store.bind(prefix, namespace, override=override) TypeError: bind() got an unexpected keyword argument 'override' <http://www.w3.org/2002/07/owl#> does not look like a valid URI, trying to serialize this will break. Traceback (most recent call last): File "C:/Users/Pasquale Bonasia/PycharmProjects/pythonProject1/OntoPharma.py", line 238, in compatibilita row = g.query(inter) File "C:\Users\Pasquale Bonasia\Documents\Project Pycharm\lib\site-packages\rdflib\graph.py", line 1389, in query return result(processor.query(query_object, initBindings, initNs, **kwargs)) File "C:\Users\Pasquale Bonasia\Documents\Project Pycharm\lib\site-packages\rdflib\plugins\sparql\processor.py", line 77, in query parsetree = parseQuery(strOrQuery) File "C:\Users\Pasquale Bonasia\Documents\Project Pycharm\lib\site-packages\rdflib\plugins\sparql\parser.py", line 1535, in parseQuery q = expandUnicodeEscapes(q) File "C:\Users\Pasquale Bonasia\Documents\Project Pycharm\lib\site-packages\rdflib\plugins\sparql\parser.py", line 1526, in expandUnicodeEscapes return expandUnicodeEscapes_re.sub(expand, q) TypeError: expected string or bytes-like object |
Free forum by Nabble | Edit this page |