So, I’m trying to capture and store wave height data and cache it in a file based on the fetch timestamp in local time.
I have hit an error with the last section.
Here is the error -
d = sorted(data['hours'], key=lambda i: i['time']) TypeError: list indices must be integers or slices, not str
I have tried to fix it but I have no idea how to.
Edit - I apologise for all the random comments, I am a bit messy