pygom icon indicating copy to clipboard operation
pygom copied to clipboard

Use of get_transition_graph method causes AttributeError.

Open m-d-grunnill opened this issue 2 years ago • 0 comments

Use of get_transition_graph method with arument show=True causes AttributeError (see below). Returned graph can be rendered as pdf using method .render(filename='filename', format='pdf') though.

This maybe as the dependent package graphviz was updated to version 20.1 23rd July 2022.

Traceback (most recent call last): File "C:\Users\mdgru.conda\envs\pygom\lib\code.py", line 90, in runcode exec(code, self.locals) File "", line 18, in File "C:\Users\mdgru.conda\envs\pygom\lib\site-packages\pygom-0.18-py3.10-win-amd64.egg\pygom\model\deterministic.py", line 356, in get_transition_graph plt.imshow(img) File "C:\Users\mdgru.conda\envs\pygom\lib\site-packages\matplotlib_api\deprecation.py", line 454, in wrapper return func(*args, **kwargs) File "C:\Users\mdgru.conda\envs\pygom\lib\site-packages\matplotlib\pyplot.py", line 2611, in imshow __ret = gca().imshow( File "C:\Users\mdgru.conda\envs\pygom\lib\site-packages\matplotlib\pyplot.py", line 2225, in gca return gcf().gca() File "C:\Users\mdgru.conda\envs\pygom\lib\site-packages\matplotlib\pyplot.py", line 830, in gcf return figure() File "C:\Users\mdgru.conda\envs\pygom\lib\site-packages\matplotlib_api\deprecation.py", line 454, in wrapper return func(*args, **kwargs) File "C:\Users\mdgru.conda\envs\pygom\lib\site-packages\matplotlib\pyplot.py", line 771, in figure manager = new_figure_manager( File "C:\Users\mdgru.conda\envs\pygom\lib\site-packages\matplotlib\pyplot.py", line 346, in new_figure_manager _warn_if_gui_out_of_main_thread() File "C:\Users\mdgru.conda\envs\pygom\lib\site-packages\matplotlib\pyplot.py", line 336, in _warn_if_gui_out_of_main_thread if (_get_required_interactive_framework(_get_backend_mod()) and File "C:\Users\mdgru.conda\envs\pygom\lib\site-packages\matplotlib\pyplot.py", line 206, in _get_backend_mod switch_backend(dict.getitem(rcParams, "backend")) File "C:\Users\mdgru.conda\envs\pygom\lib\site-packages\matplotlib\pyplot.py", line 266, in switch_backend canvas_class = backend_mod.FigureCanvas AttributeError: module 'backend_interagg' has no attribute 'FigureCanvas'. Did you mean: 'FigureCanvasAgg'?

m-d-grunnill avatar Sep 28 '22 17:09 m-d-grunnill