@vish I’ve just run your code with Plotly 2.0.15 (the last version) and it plots the figure in notebook and save the image. No error message is displayed.
@empet I just tried running the code in a new jupyter notebook and, like you, did not replicate the error.
That said, this error continues in the original notebook in which this code was contained and occurs even when (a) this code is the first code to execute and (b) I make a copy of the notebook.