Returned list of callback function is not JSON serializable

From what I read, if I want to send html components to a children attribute with a callback function, they need to be in a list, e.g. html.H1(“some text here”) ==> [html.H1(“some text here”)].

However, when I followed the instruction, I got this error says:
dash.exceptions.InvalidCallbackReturnValue: The callback for <Output main-table.children>
returned a value having type list which is not JSON serializable.

And then the error message also says:
In general, Dash properties can only be dash components, strings, dictionaries, numbers, None, or lists of those.

The list returned by my callback function contains dash html components to create a table body with a for loop.

I’m very confused now. Could anybody help me? Thanks.

Due to some reason I cannot upload my code here. Sorry for the inconvenience caused.