Trouble creating animated GO scatterplot with multiple layers

Hi,

I’m trying to create a three-layed animated scatterplot using a main scatterplot and two filled shapes which also use scatterplot. Each will plot fine on their own but when I combine them I get errors: “The ‘frames’ property is a tuple of instances of
Frame that may be specified as:
- A list or tuple of instances of plotly.graph_objs.Frame
- A list or tuple of dicts of string/value properties that
will be passed to the Frame constructor”

But I’m pretty sure that that’s exactly what I’m doing. What am I doing wrong? Thanks!

frames_normal = [go.Frame(
                    data=[go.Scatter(
                        x=group['X'],
                        y=group['Y'],
                        mode="markers")
                    ]) for name, group in grouped]

frames_convex_team1 = [go.Frame(
                        data=[go.Scatter(
                        x=group['hull_x'],
                        y=group['hull_y'],
                        mode="markers",
                        marker=dict(color="red"),
                        fill="toself")
                    ]) for name, group in grouped_convex_hull_team1]

frames_convex_team2 = [go.Frame(
                        data=[go.Scatter(
                        x=group['hull_x'],
                        y=group['hull_y'],
                        mode="markers",
                        marker=dict(color="blue"),
                        fill="toself")
                    ]) for name, group in grouped_convex_hull_team2]

frames = [frames_normal,frames_convex_team1,frames_convex_team2]

The key to this issue is found in another semi-related issue on this site:

fig.add_trace(fig2.data[0])
for i, frame in enumerate(fig.frames):
    fig.frames[i].data += (fig2.frames[i].data[0],)

fig.add_trace(fig3.data[0])
for i, frame in enumerate(fig.frames):
    fig.frames[i].data += (fig3.frames[i].data[0],)

This adds the data from the second/third figures into the first and plots them all together (basically).