lambdamusic / Ontospy

Python library and command-line interface for inspecting and visualizing RDF models aka ontologies.
http://lambdamusic.github.io/Ontospy/
MIT License
219 stars 52 forks source link

Error on printing skos taxononomy #8

Closed lambdamusic closed 8 years ago

lambdamusic commented 8 years ago

Shell fails on 'tree' command:

Loaded graph: </Users/tonyhammond/.ontospy/modelssubjects.ttl>
----------------
Ontologies......: 1
Classes.........: 0
Properties......: 0
..annotation....: 0
..datatype......: 0
..object........: 0
Concepts(SKOS)..: 2791
----------------
==> Ontology URI: <http://ns.nature.com/subjects/>
----------------
<subjects.ttl>: tree concepts
Traceback (most recent call last):
  File "/usr/local/bin/ontospy", line 11, in <module>
    sys.exit(main())
  File "/Library/Python/2.7/site-packages/ontospy/ontospy.py", line 498, in main
    Shell().cmdloop()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/cmd.py", line 142, in cmdloop
    stop = self.onecmd(line)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/cmd.py", line 221, in onecmd
    return func(arg)
  File "/Library/Python/2.7/site-packages/ontospy/shell.py", line 581, in do_tree
    g.printSkosTree(showids=False, labels=False, showtype=True)
TypeError: printSkosTree() got an unexpected keyword argument 'showtype'
% 
lambdamusic commented 8 years ago

This is a caching issue. The cached version of that ontology is just out of sync.

The cache can be recreated by typing:

> ontospy-manager –c 

The next release of ontospy will have a feature that spots this kind of errors..

lambdamusic commented 8 years ago

Fixed with version 1.6.5.6 (just released):

pip install ontospy -U