I'd like to deploy my app with mod_wsgi. I thought I had it working,
but then realised that the images weren't working. The action for an
image is really simple:
def image(self, id):
image = self.session.query(Image).get(int(id))
return Response(image.image, 'image/jpeg')
But when I request an images I get:
TypeError: expected string or Unicode object, buffer found
in my apache error log and no data is returned. I tried changing the
return to
return Response(str(image.image), 'image/jpeg')
I'm not sure whether that makes sense, but it didn't seem to help.
Any advice would be greatly appreciated.
Thanks,
Graham
What other error messages appear immediately prior to the traceback?
Did you restart Apache to pick up your code change before testing
again?
Graham
On Jun 3, 2:56 am, Graham Stratton <goo...@ramsey.uk.com> wrote:
> Hi,
>
> I'd like to deploy my app withmod_wsgi. I thought I had it working,