Texttemplate no longer available in heatmap?

Hi all,

I’ve been running plotly heatmaps in python with the texttemplate parameter detailed here:

Today when I have tried to run the same plots I get a error like this:

File "/usr/local/lib/python3.9/site-packages/plotly/graph_objs/_heatmap.py", line 2958, in __init__
    self._process_kwargs(**dict(arg, **kwargs))
  File "/usr/local/lib/python3.9/site-packages/plotly/basedatatypes.py", line 4337, in _process_kwargs
    raise err
ValueError: Invalid property specified for object of type plotly.graph_objs.Heatmap: 'texttemplate'
Bad property path:

The error message also lists all the parameters and texttemplates is not included in this. I’m using graph objects.

Has something changed recently? Does anyone know how to get round this? Sorry if the answer is obvious, I’m a plotly newb so any help would be appreciated

Are you running the last Plotly version (5.6)? For me it works:

import plotly.graph_objects as go
import numpy as np
fig = go.Figure(data=go.Heatmap(
                    z=np.random.randint(2,15, (3,3)),
                    text=[['A', 'Ab', 'C'],
                          ['Cd', 'E', 'Ef'],
                          ['G', 'Gh', 'Kl']],
fig.update_layout(width=500, height=500, font_size=10)


yes, I updated the version and now it works. Thanks!