clairenied15 / heart_rate_sentinel_server

0 stars 0 forks source link

TypeError: The view function did not return a valid response. The function either returned None or ended without a return statement. #6

Closed clairenied15 closed 5 years ago

clairenied15 commented 5 years ago

I redid my code using the datastore you suggested, except I made it a list of dictionaries instead of a dictionary of dictionaries. I am getting the above error in my heart_rate() function when I try to run my call_server_hr.py file. I'm thinking it may have to do with my appending of heart rates and time stamps but I'm not sure. This error gave me no hint as to what was breaking or causing it. I pushed my updated code to master.

clairenied15 commented 5 years ago

I tried printing datastore in my heart_rate() function right after the line that says "global datastore" and it is showing that data store is an empty list.

clairenied15 commented 5 years ago

Oh I just figured out the problem. I was restarting the server without calling the new_patient() function so datastore was not created.