python-esppy
python-esppy copied to clipboard
_repr_svg error with graphviz 0.19
The latest updates to graphviz(0.19) removed the _repr_svg() function. Trying to show the graph for a model will fail with an AttributeError: AttributeError Traceback (most recent call last)
/opt/conda/lib/python3.8/site-packages/IPython/core/formatters.py in call(self, obj)
343 method = get_real_method(obj, self.print_method)
344 if method is not None:
--> 345 return method()
346 return None
347 else:
/opt/conda/lib/python3.8/site-packages/esppy/project.py in repr_svg(self)
778 def _repr_svg_(self):
779 try:
--> 780 return scale_svg(self.to_graph().repr_svg())
781 except ImportError:
782 raise AttributeError('_repr_svg_')
AttributeError: 'Digraph' object has no attribute 'repr_svg'
The workaround is to downgrade graphviz to 0.18.2