lambdamusic / Ontospy

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

Turtle code implementation when generating html multi page does not work #68

Closed bejar closed 5 years ago

bejar commented 6 years ago

When generating html multi page, the generation of the turtle code implementation fails with the error "Error: Pygmentize Failed".

I have had a look at the code and in the file core/viz_factory.py in line 235, the method "serialize" is called for an object of type OntoProperty. Its superclass RDF_entity has a method "rdf_source" that by default returns the turtle representation of the object. I have patched the code so this method is called instead and this fixes the problem.

VladimirAlexiev commented 6 years ago

About #12: turns out I already have it

>pip install pygments
Requirement already satisfied: pygments in c:\users\vladimir.alexiev\appdata\local\programs\python\python35\lib\site-pac
kages (2.2.0)

@lambdamusic could you make a release with @bejar's fix?

Cheers!

lambdamusic commented 6 years ago

Thanks for the feedback. I've updated the library Ontodocs relies on, which is what caused the error (@bejar well spotted!)

Now fixed: https://github.com/lambdamusic/Ontodocs/pull/18

The new version is available on Pypi