I get the following error using this code. I think after many years, it is not working now, so for future references, don’t use this method.
AttributeError: ‘Spine’ object has no attribute ‘is_frame_like’
Traceback:
File “c:\programdata\anaconda3\lib\site-packages\streamlit\script_runner.py”, line 332, in _run_script
exec(code, module.dict)
File “C:\Users\bdemir\OneDrive - Tekfen Holding A.Ş\Python\BD_Tunnel_Def\deneme.py”, line 13, in
st.plotly_chart(fig)
File “c:\programdata\anaconda3\lib\site-packages\streamlit\elements\plotly_chart.py”, line 116, in plotly_chart
marshall(
File “c:\programdata\anaconda3\lib\site-packages\streamlit\elements\plotly_chart.py”, line 139, in marshall
figure = plotly.tools.mpl_to_plotly(figure_or_data)
File “c:\programdata\anaconda3\lib\site-packages\plotly\tools.py”, line 112, in mpl_to_plotly
matplotlylib.Exporter(renderer).run(fig)
File “c:\programdata\anaconda3\lib\site-packages\plotly\matplotlylib\mplexporter\exporter.py”, line 51, in run
self.crawl_fig(fig)
File “c:\programdata\anaconda3\lib\site-packages\plotly\matplotlylib\mplexporter\exporter.py”, line 118, in crawl_fig
self.crawl_ax(ax)
File “c:\programdata\anaconda3\lib\site-packages\plotly\matplotlylib\mplexporter\exporter.py”, line 122, in crawl_ax
with self.renderer.draw_axes(ax=ax,
File “c:\programdata\anaconda3\lib\contextlib.py”, line 113, in enter
return next(self.gen)
File “c:\programdata\anaconda3\lib\site-packages\plotly\matplotlylib\mplexporter\renderers\base.py”, line 57, in draw_axes
self.open_axes(ax=ax, props=props)
File “c:\programdata\anaconda3\lib\site-packages\plotly\matplotlylib\renderer.py”, line 169, in open_axes
bottom_spine = mpltools.get_spine_visible(ax, “bottom”)
File “c:\programdata\anaconda3\lib\site-packages\plotly\matplotlylib\mpltools.py”, line 368, in get_spine_visible
spine_frame_like = spine.is_frame_like()