doniyor doniyor - 4 months ago 20
Python Question

'utf8' codec can't decode byte 0xe4 ...: invalid continuation byte in timezone

I am doing in UserProfile model this:

def repeated_times(self, test, date):
return self.user.user_test_results.filter(taken_date__month=date.month, djangotest=test).count()


but I am getting

'utf8' codec can't decode byte 0xe4 in position 169: invalid continuation byte


because this: enter image description here

(bigger image: http://content.screencast.com/users/doniyor/folders/Jing/media/5baf8537-b48f-4194-8b71-384ec880a7b4/2015-10-23_0753.png )

what am I missing?

Answer

I had to disable USE_TZ, then it worked.

Comments