Runtime error when calling get_data from Python middleware

I am having this same issue, I am using the 3.9 python version. Can anyone help me?