title: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode
body: <p>This is the complete error that I am getting when I go to the relevant view.</p>
  
  <p><code>/Library/Python/2.7/site-packages/django/core/files/base.py:106: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal
    if line[-1] in ('\n', '\r'):</code></p>
  
  <p>The code is pretty straightforward. This is in my views.py</p>
  
  <pre><code>def my_image(request):
      clothes = Clothes.objects.get(clothesid = '2')
      get_image = clothes.image
      return HttpResponse(get_image, mimetype="image/png")
  </code></pre>
  
  <p>And this is in my models.py </p>
  
  <pre><code>image = models.FileField(upload_to='images/')
  </code></pre>
  
  <p>The complete <code>Clothes</code> model looks like this:</p>
  
  <pre><code>class Clothes(models.Model):
      clothesid = models.IntegerField(primary_key=True)
      clothessize = models.CharField(max_length=255L, blank=True)
      clothescolour = models.CharField(max_length=255L, blank=True)
      clothestype = models.CharField(max_length=255L, blank=True)
      image = models.FileField(upload_to='images/')
      url = models.CharField(max_length=255L, blank=True)
      gender = models.CharField(max_length=1L, blank=True)
      clothescategory = models.CharField(max_length=255L, blank=True)
      clothesage = models.CharField(max_length=255L, blank=True)
  
      class Meta:
          db_table = 'Clothes'
  
      def __unicode__(self):
          return self.image.name
  </code></pre>
  
  <p>In MySQL, the image field is collated as <code>latin1_swedish_ci</code> in case that is an issue. </p>
  
  <p>What is the problem here? </p>