I concur with Derek O's solution. I was running plotly v6.01 and encountered this error in jupyter notebook. I downgraded to plotly version 5.24.1 (5.23.0 does not appear to be available in Anaconda) and obtained the proper plot. It seems that plotly is plotting the index number of the y values, not the y-values themselves. I tried a couple of bar charts and they are consistent with this explanation.
I hope Derek O submits this as an issue to plotly.