TypeError: Object of type 'generator' is not JSON serializable

Hello, Here is the format of my csv file: Image_Name,Features,Device1 Mbps,Device2 Mbps,Device3 Mbps,Device4 Mbps. With each unique Image_Name from the drop_down menu, I would like to draw line graph for each device for each feature. But I am getting this error, “TypeError: Object of type ‘generator’ is not JSON serializable”. I am able to create graph individually using the same file format, but while trying to incorporate drop-down menu, it seems not working, need help ! Happy New Year 2020!

Code location: https://github.com/mithun2k5/Dashboard-And-Plotly/blob/master/dash_script_new1.py

Data file location: https://github.com/mithun2k5/Dashboard-And-Plotly/blob/master/Sample1.csv