use images from django

19 views
Skip to first unread message

pvilas

unread,
Apr 7, 2011, 1:13:40 PM4/7/11
to geraldo-users
Hi:

Has anybody tried to use images from django:

I'm trying with:


Image(left=1*cm,
get_image=lambda graphic:
PILImage.open(os.path.join(settings.MEDIA_ROOT,
graphic.instance.cliente.foto.url)),
),

but I have the error:

Impresion unsupported operand type(s) for -: 'float' and 'NoneType'

The path of the image is correct and the image exists.

Rasjid Wilcox

unread,
Apr 7, 2011, 8:42:35 PM4/7/11
to gerald...@googlegroups.com

I've not really used Geraldo enough yet to have a deep insight, and
I'm not really a Django user, but I'd suggest either stepping through
with a (remote) debugger, or just splitting out the lambda into a
function so you can put some print statements or other logging into
your code and work out what is going on.

Cheers,

Rasjid.

Reply all
Reply to author
Forward
0 new messages