I am using owlready2 for:
1-Read a source ontology
2-If individuals have a particular annotation
3- I create a class with the same uri in the target ontology
I use a sparql query for find individuals and an insert query with parameter
owlready2 gives me this error.
Traceback (most recent call last):
File "/home/bernard/.local/lib/python3.7/site-packages/rdflib/plugin.py", line 100, in get
p = _plugins[(name, kind)]
TypeError: unhashable type: 'list'
ontoSource = default_world.get_ontology(args.source).load()
The error you obtain is located in rdflib; I have limited knowledge in rdflib for solving it.
I suggest to use the new native SPARQL engine included in Owlready, as follows below. Notice the use of world_cible._abbreviate(), because Owlready uses integer internally for identifying entities, and not directly IRI.