_reverse_with_prefix() argument after * must be an iterable, not int

#For this example:
scores_url = reverse('get_scores', args=(obj.pk))

#putting a comma at the end of the args tuple fixes it.
scores_url = reverse('get_scores', args=(obj.pk,))

#Alternatively, as mentioned in the docs, using a list would work fine:
scores_url = reverse('get_scores', args=[obj.pk])

Here is what the above code is Doing:
1. reverse(‘get_scores’, args=(obj.pk))
2. reverse(‘get_scores’, args=(obj.pk,))
3. reverse(‘get_scores’, args=[obj.pk])

The first two are equivalent, and the third is equivalent to the first two.

The reason the first two are equivalent is because the comma at the end of the args tuple tells Python that it’s a tuple, even if there’s only one element in it.

The reason the third is equivalent to the first two is because when you use a list as the args argument, Django automatically converts it to a tuple.