Sunday, September 11, 2016

AssertionError: database connection isn't set to UTC

Dear Reader, 

I hope someone here can help me, resolve this issue.

I have installed a new server and even though i have the same exact setup running, and I have even cloned the database from my other server. I get this error when i try to connect to Django on the web. And I cannot figure out why. 

Internal Server Error: /teams/
Traceback (most recent call last):
  File "/usr/lib64/python3.4/site-packages/django/core/handlers/base.py", line 149, in get_response
    response = self.process_exception_by_middleware(e, request)
  File "/usr/lib64/python3.4/site-packages/django/core/handlers/base.py", line 147, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/usr/lib64/python3.4/site-packages/django/views/generic/base.py", line 68, in view
    return self.dispatch(request, *args, **kwargs)
  File "/usr/lib64/python3.4/site-packages/django/views/generic/base.py", line 88, in dispatch
    return handler(request, *args, **kwargs)
  File "/var/www/djc/TeamTournament/teamTournamentApp/views.py", line 167, in get
    return HttpResponseRedirect(reverse('teamTournamentApp:team_tournament',args=(Tournament.objects.latest('start_date').id,)))
  File "/usr/lib64/python3.4/site-packages/django/db/models/manager.py", line 122, in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
  File "/usr/lib64/python3.4/site-packages/django/db/models/query.py", line 544, in latest
    return self._earliest_or_latest(field_name=field_name, direction="-")
  File "/usr/lib64/python3.4/site-packages/django/db/models/query.py", line 538, in _earliest_or_latest
    return obj.get()
  File "/usr/lib64/python3.4/site-packages/django/db/models/query.py", line 381, in get
    num = len(clone)
  File "/usr/lib64/python3.4/site-packages/django/db/models/query.py", line 240, in __len__
    self._fetch_all()
  File "/usr/lib64/python3.4/site-packages/django/db/models/query.py", line 1074, in _fetch_all
    self._result_cache = list(self.iterator())
  File "/usr/lib64/python3.4/site-packages/django/db/models/query.py", line 68, in __iter__
    for row in compiler.results_iter(results):
  File "/usr/lib64/python3.4/site-packages/django/db/models/sql/compiler.py", line 805, in results_iter
    for rows in results:
  File "/usr/lib64/python3.4/site-packages/django/db/models/sql/compiler.py", line 1239, in cursor_iter
    sentinel):
  File "/usr/lib64/python3.4/site-packages/django/db/models/sql/compiler.py", line 1238, in <lambda>
    for rows in iter((lambda: cursor.fetchmany(GET_ITERATOR_CHUNK_SIZE)),
  File "/usr/lib64/python3.4/site-packages/django/db/utils.py", line 102, in inner
    return func(*args, **kwargs)
  File "/usr/lib64/python3.4/site-packages/django/db/backends/postgresql/utils.py", line 6, in utc_tzinfo_factory
    raise AssertionError("database connection isn't set to UTC")
AssertionError: database connection isn't set to UTC

I am running Django 1.9.2. 

Find more information on http://stackoverflow.com/questions/38807296/django-1-9-2-assertionerror-database-connection-isnt-set-to-utc

I hope someone can help me?

I do not believe the error is actually what the problem is, there most be something else in the setup which is incorrect. 

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/a14f8c82-bec6-4e4a-8db9-66e4160acf22%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment