Black Lives Matter. Please consider donating to Black Girls Code today.

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:

Data file location: