Problem deploying with mod_wsgi

6 views
Skip to first unread message

Graham Stratton

unread,
Jun 2, 2007, 12:56:45 PM6/2/07
to pylons-discuss
Hi,

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

Graham Dumpleton

unread,
Jun 3, 2007, 12:16:17 AM6/3/07
to pylons-discuss
What is the actual traceback dumped out to the Apache error log file
if any?

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,

Reply all
Reply to author
Forward
0 new messages