Keakon,
I have 2 answers here.
1.
"self.response.out.write(body)" produced no output.
Btw, the input to body is an html form "textarea" .
2.
I made a mistake. Your suggestion to use .encode('utf8')
did produce a slight improvement in the Log Console. I
got the following extra lines and did not notice them
until just now. So the utf8 encode did allow the
MailService.Send to begin, when it had not previously.
********extra Log Console info below *************
INFO 2009-05-30 14:32:15,906 mail_stub.py] MailService.Send
INFO 2009-05-30 14:32:15,971 mail_stub.py] From:
[email protected]
INFO 2009-05-30 14:32:15,972 mail_stub.py] To: [email protected]
INFO 2009-05-30 14:32:15,973 mail_stub.py] Subject: How's my
dancing?
INFO 2009-05-30 14:32:15,974 mail_stub.py] Body:
INFO 2009-05-30 14:32:15,974 mail_stub.py] Content-type: text/
plain
INFO 2009-05-30 14:32:15,975 mail_stub.py] Data length: 4
ERROR 2009-05-30 14:32:16,140 __init__.py] 'tuple' object has no
attribute 'encode'
On May 30, 9:42 am, 风笑雪 <[email protected]> wrote:
> The error is so strange.Can you just output it without any conversion?
>
> self.response.out.write(body)
>
> 2009/5/30 thebrianschott <[email protected]>
>
>
>
> > 风笑雪,
>
> > Thanks.
>
> > That .encode does not fix my problem, unfortunately.
> > When I try to do a logging.info I get the following error
> > as I did for plain body.
>
> > Do you have any different ideas, please?
>
> > logging.info("SendMessage body %s " % body)
>
> > *********error produced below*******
>
> > Traceback (most recent call last):
> > File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/
> > GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
> > google/appengine/ext/webapp/__init__.py", line 500, in __call__
> > handler.post(*groups)
> > File "/Users/brian/googleapps/howsmy/main.py", line 213, in post
> > logging.info("SendMessage body %s " % body)
> > TypeError: not all arguments converted during string formatting
>
> > On May 30, 3:48 am, 风笑雪 <[email protected]> wrote:
> > > You can try to encode it:
> > > body = message.comment.encode('utf8')
>
> > > 2009/5/30 thebrianschott <[email protected]>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google App Engine" 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/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---