I have a piece of code
for p in activities:
activity_progress_average =sum([p.activity_progress_compute])
activity_progress_average = activity_progress_average/len(activities)
Brings an error
UnboundLocalError : local variable 'activity_progress_average' referenced before assignment