lambdamusic / Ontospy

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

AttributeError when running ontodocs #67

Closed soderluk closed 5 years ago

soderluk commented 5 years ago

This used to work, but apparently there has been some changes in Ontospy, which breaks things. I've been using Ontodocs for generating HTML pages for our JSON-LD ontology and hosting them on Github Pages. Now today I tried to release an update, and the following happened:

Traceback (most recent call last):
  File "/usr/bin/ontodocs", line 11, in <module>
    sys.exit(main_cli())
  File "/usr/lib/python3.6/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python3.6/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python3.6/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python3.6/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/usr/lib/python3.6/site-packages/ontodocs/main.py", line 89, in main_cli
    url = action_visualize(source, fromshell=False, path=outputpath, title=title, theme=theme, verbose=verbose)
  File "/usr/lib/python3.6/site-packages/ontodocs/core/builder.py", line 170, in action_visualize
    g = Ontospy(ontouri, verbose=verbose)
  File "/usr/lib/python3.6/site-packages/ontospy/core/ontospy.py", line 89, in __init__
    self.build_all(verbose=verbose, hide_base_schemas=hide_base_schemas)
  File "/usr/lib/python3.6/site-packages/ontospy/core/ontospy.py", line 162, in build_all
    self.build_classes(hide_base_schemas)
  File "/usr/lib/python3.6/site-packages/ontospy/core/ontospy.py", line 299, in build_classes
    onto.all_classes += [aClass]
AttributeError: 'list' object has no attribute 'all_classes'

Using version 1.2.1 of ontodocs. Seems like there's an issue with ontospy at the moment. The following command was used: echo 2 | ontodocs /src/ontologies/ont.jsonld -o /tmp/html" -t "Title" --theme=darkly

lambdamusic commented 5 years ago

closing this issue here and following up within ontospy..