[Scribus] Scribus - Get Image from Database?

Craig Ringer craig
Tue Mar 20 13:48:04 CET 2007

Sam & Marissa Andolino wrote:
> Thank you for the reply yesterday.  I have it working with Scribus.
> How do you get an image from MySQL to display in Scribus?  I used
> createImage to create the picture frame okay, but when I try to use
> loadImage to load the MySQL image, I get:
> "TypeError: coercing to Unicode: need string or buffer, tuple found"
> This is probably because it is looking for a filename, right?

It is looking for a file name in a Unicode string, yes. You haven't
given enough information for me to tell what exactly you've tried to
pass to the function. It's a tuple of some sort, but of what you haven't

You can use the `type', `print' and `repr' functions to examine data in
Python. `len' will tell you how many elements there are in a tuple.

> How do I
> get it to display directly from MySQL, without creating a temporary
> file, and then displaying it?

At this point, you don't. Scribus's image handling is built completely
around external images and it has absolutely no support for
document-embedded images or anything else. Sorry.

Craig Ringer

More information about the scribus mailing list