Can we get the relevant backtrace, please?
On Mon, Feb 13, 2012 at 10:41 PM, Patrick <[email protected]>wrote:
> f is image data, see here:
>
> x = web.input(bilder={})
> b.set_image(x.bilder.file)
> ----
> f = x.bilder.file
> ----
>
> And the failure happens in
>
> /web/net.py
>
>
> Am 09.02.2012 16:23, schrieb Primoz Anzur:
>
>> What is 'f'? Is it image data or the filename?
>>
>>
>> On Thu, Feb 9, 2012 at 12:38 PM, Patrick Erdmann <[email protected]
>> <mailto:[email protected]>> wrote:
>>
>> Hi,
>>
>> when i try to upload images i get following Error:
>> UnicodeDecodeError: 'utf8' codec can't decode byte 0xff in position
>> 0: invalid start byte
>>
>> . Everything works fine until i call Image.open(f), from PIL import
>> Image.
>>
>> x = web.input(bilder={})
>> b = Bilder()
>> b.set_image(x.bilder.file)
>> b.save()
>>
>> ...
>> class Bilder(Document):
>> ...
>> def set_image(self, f):
>> _i = Image.open(f, 'wb')
>> ...
>>
>>
>> --
>> Mit freundlichen Grüßen
>>
>> Patrick Erdmann
>>
>> XMPP/Mail: [email protected] <mailto:[email protected]>
>>
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "web.py" group.
>> To post to this group, send email to [email protected]
>> <mailto:[email protected]**>.
>>
>> To unsubscribe from this group, send email to
>> webpy+unsubscribe@__googlegrou**ps.com <http://googlegroups.com>
>>
>> <mailto:webpy%2Bunsubscribe@**googlegroups.com<webpy%[email protected]>
>> >.
>>
>> For more options, visit this group at
>>
>> http://groups.google.com/__**group/webpy?hl=en<http://groups.google.com/__group/webpy?hl=en>
>>
>> <http://groups.google.com/**group/webpy?hl=en<http://groups.google.com/group/webpy?hl=en>
>> >.
>>
>>
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "web.py" group.
>> To post to this group, send email to [email protected].
>> To unsubscribe from this group, send email to
>> webpy+unsubscribe@**googlegroups.com<webpy%[email protected]>
>> .
>> For more options, visit this group at
>> http://groups.google.com/**group/webpy?hl=en<http://groups.google.com/group/webpy?hl=en>
>> .
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "web.py" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to webpy+unsubscribe@**
> googlegroups.com <webpy%[email protected]>.
> For more options, visit this group at http://groups.google.com/**
> group/webpy?hl=en <http://groups.google.com/group/webpy?hl=en>.
>
>
--
You received this message because you are subscribed to the Google Groups
"web.py" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/webpy?hl=en.