Skip to content

Instantly share code, notes, and snippets.

@baysao
Created July 5, 2017 04:17
Show Gist options
  • Save baysao/56db6e2ff5f6f145806b53d2cc73fad4 to your computer and use it in GitHub Desktop.
Save baysao/56db6e2ff5f6f145806b53d2cc73fad4 to your computer and use it in GitHub Desktop.
log cm
[05/Jul/2017 04:05:40] ERROR [django.request:256] Internal Server Error: /backend/cm/page/trang-chu/
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 132, in get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/usr/local/lib/python2.7/site-packages/django/views/decorators/csrf.py", line 58, in wrapped_view
return view_func(*args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/django/views/generic/base.py", line 71, in view
return self.dispatch(request, *args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/rest_framework/views.py", line 477, in dispatch
response = self.handle_exception(exc)
File "/usr/local/lib/python2.7/site-packages/rest_framework/views.py", line 437, in handle_exception
self.raise_uncaught_exception(exc)
File "/usr/local/lib/python2.7/site-packages/rest_framework/views.py", line 474, in dispatch
response = handler(request, *args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/django/utils/decorators.py", line 34, in _wrapper
return bound_func(*args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/django/utils/decorators.py", line 110, in _wrapped_view
response = view_func(request, *args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/django/utils/decorators.py", line 30, in bound_func
return func.__get__(self, type(self))(*args2, **kwargs2)
File "./cm/views/page.py", line 100, in get
return response.success(serialized.data)
File "/usr/local/lib/python2.7/site-packages/rest_framework/serializers.py", line 527, in data
ret = super(Serializer, self).data
File "/usr/local/lib/python2.7/site-packages/rest_framework/serializers.py", line 262, in data
self._data = self.to_representation(self.instance)
File "/usr/local/lib/python2.7/site-packages/rest_framework/serializers.py", line 496, in to_representation
ret[field.field_name] = field.to_representation(attribute)
File "/usr/local/lib/python2.7/site-packages/rest_framework/fields.py", line 1734, in to_representation
return method(value)
File "./cm/serializers/page.py", line 30, in get_banners
result.append(MovieSerializer(ribbon_item.entity,context={"platform":self.context.get("platform",None)}).data)
File "/usr/local/lib/python2.7/site-packages/rest_framework/serializers.py", line 527, in data
ret = super(Serializer, self).data
File "/usr/local/lib/python2.7/site-packages/rest_framework/serializers.py", line 262, in data
self._data = self.to_representation(self.instance)
File "/usr/local/lib/python2.7/site-packages/rest_framework/serializers.py", line 496, in to_representation
ret[field.field_name] = field.to_representation(attribute)
File "/usr/local/lib/python2.7/site-packages/rest_framework/fields.py", line 1215, in to_representation
'Expected a `date`, but got a `datetime`. Refusing to coerce, '
AssertionError: Expected a `date`, but got a `datetime`. Refusing to coerce, as this may mean losing timezone information. Use a custom read-only field and deal with timezone issues explicitly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment