Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion web.py' net.py
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Patrick  
View profile  
 More options Feb 13 2012, 4:41 pm
From: Patrick <perdmann...@googlemail.com>
Date: Mon, 13 Feb 2012 22:41:07 +0100
Local: Mon, Feb 13 2012 4:41 pm
Subject: Re: [webpy] web.py' net.py
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 <patr...@perdmann.de
> <mailto:patr...@perdmann.de>> 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: patr...@perdmann.de <mailto:patr...@perdmann.de>

>     --
>     You received this message because you are subscribed to the Google
>     Groups "web.py" group.
>     To post to this group, send email to webpy@googlegroups.com
>     <mailto:webpy@googlegroups.com>.
>     To unsubscribe from this group, send email to
>     webpy+unsubscribe@__googlegroups.com
>     <mailto:webpy%2Bunsubscribe@googlegroups.com>.
>     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 webpy@googlegroups.com.
> To unsubscribe from this group, send email to
> webpy+unsubscribe@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/webpy?hl=en.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.