Hi @mangarapaul and welcome to the Dash community
Nothing jumps out as incorrect in the code snippet you posted. It would be helpful if you can include a complete minimal example with some sample data that we can run and see the same error.
To find out more about how to do that, see this post: How to Get your Questions Answered on the Plotly Forum