          except InvalidPage as exc:
              error_format = _('Invalid page (%(page_number)s): %(message)s')
              raise Http404(error_format % {
                  'page_number': page_number,
                  'message': str(exc)
              })
  
          return page
  
      def filter_queryset(self, queryset):
 
</s> remove             raise ParseError('Multipart form parse error - %s' % str(exc))
 </s> add             raise ParseError('Multipart form parse error - %s' % six.text_type(exc)) </s> remove         return self.choice_strings_to_values[str(value)]
 </s> add         return self.choice_strings_to_values[six.text_type(value)] </s> remove             data = int(str(data))
 </s> add             data = int(six.text_type(data)) </s> remove         return str(value)
 </s> add         return six.text_type(value) </s> remove         return str(value)
 </s> add         return six.text_type(value)
                'message': six.text_type(exc)
          except InvalidPage as exc:
              error_format = _('Invalid page (%(page_number)s): %(message)s')
              raise Http404(error_format % {
                  'page_number': page_number,
                'message': six.text_type(exc)
              })
  
          return page
  
      def filter_queryset(self, queryset):
keep keep keep keep replace keep keep keep keep keep
 Use six.text_type instead of str everywhere 
rest_framework/generics.py