  
          try:
              return self.queryset.get(pk=data)
          except ObjectDoesNotExist:
              msg = "Invalid pk '%s' - object does not exist." % smart_unicode(data)
              raise ValidationError(msg)
  
  ### Slug relationships
  
  
 
</s> remove             msg = "Invalid pk '%s' - object does not exist." % smart_unicode(data)
 </s> add             msg = "Invalid pk '%s' - object does not exist." % smart_text(data) </s> remove         except MultiPartParserError, exc:
 </s> add         except MultiPartParserError as exc: </s> remove         except (ExpatError, ETParseError, ValueError), exc:
 </s> add         except (ExpatError, ETParseError, ValueError) as exc: </s> remove         except ValueError, exc:
 </s> add         except ValueError as exc: </s> remove         except (ValueError, yaml.parser.ParserError), exc:
 </s> add         except (ValueError, yaml.parser.ParserError) as exc:
            msg = "Invalid pk '%s' - object does not exist." % smart_text(data)
  
          try:
              return self.queryset.get(pk=data)
          except ObjectDoesNotExist:
            msg = "Invalid pk '%s' - object does not exist." % smart_text(data)
              raise ValidationError(msg)
  
  ### Slug relationships
  
  
keep keep keep keep replace keep keep keep keep keep
 First passing test under p3k \o/ 
rest_framework/fields.py