Hi,

This was a reported issue,
http://code.google.com/p/googleappengine/issues/detail?id=182, but I had
believed it was fixed.  What version of the SDK are you using? Is this with
1.1.5?

-Marzia

On Tue, Nov 4, 2008 at 8:37 AM, pr3d4t0r <[EMAIL PROTECTED]> wrote:

>
> Greetings.
>
> If I update the code that dispatches an email from the app while
> running in the dev_appserver.py without re-starting the server, the
> next few calls to the same method start throwing the errors below.
> Can you please explain what is happening and why this part of the App
> Engine is sensitive to changes, whereas others don't care?  The error
> is unrecoverable and once it occurs it's necessary to re-start the
> devevelopment app server. Errors immediately below, source code
> after.  Thanks in advance.
>
> INFO     2008-11-04 16:20:39,058 dev_appserver.py] "GET /static/
> email_bookmark.html?8|Time%20Magazine|http%3A//cruzapp.com/|<http://cruzapp.com/%7C>
> [EMAIL PROTECTED] HTTP/1.1" 200 -
> INFO     2008-11-04 16:20:39,089 dev_appserver.py] "GET /favicon.ico
> HTTP/1.1" 200 -
> INFO     2008-11-04 16:20:39,118 dev_appserver.py] "GET /styles/
> bookmarksbin.css HTTP/1.1" 200 -
> INFO     2008-11-04 16:20:39,149 dev_appserver.py] "GET /images/
> BookmarksBin-logo.gif HTTP/1.1" 200 -
> INFO     2008-11-04 16:20:40,243 bookmarksbin.py] action = share
> INFO     2008-11-04 16:20:40,271 mail_stub.py] MailService.Send
> INFO     2008-11-04 16:20:40,272 mail_stub.py]   From: [EMAIL PROTECTED]
> INFO     2008-11-04 16:20:40,272 mail_stub.py]   To: [EMAIL PROTECTED]
> INFO     2008-11-04 16:20:40,272 mail_stub.py]   Subject: BookmarksBin
> shared link
> INFO     2008-11-04 16:20:40,272 mail_stub.py]   Body:
> INFO     2008-11-04 16:20:40,273 mail_stub.py]     Content-type: text/
> plain
> INFO     2008-11-04 16:20:40,273 mail_stub.py]     Data length: 112
> INFO     2008-11-04 16:20:40,273 mail_stub.py] -----
>
>       Hello,
>
>       A BookmarksBin user thought you may enjoy
>       reading this:
>       http://cruzapp.com/
> -----
> ERROR    2008-11-04 16:20:40,298 __init__.py] Traceback (most recent
> call last):
>  File "/Users/ciurana/Documents/publishing/Apress/GoogleAppEngine/
> GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-
> default.bundle/Contents/Resources/google_appengine/google/appengine/
> ext/webapp/__init__.py", line 501, in __call__
>    handler.post(*groups)
>  File "/Users/ciurana/development/AppEngine/bookmarksbin/
> bookmarksbin.py", line 223, in post
>    bookmarks = self._processAction()
>  File "/Users/ciurana/development/AppEngine/bookmarksbin/
> bookmarksbin.py", line 203, in _processAction
>    self._shareBookmark()
>  File "/Users/ciurana/development/AppEngine/bookmarksbin/
> bookmarksbin.py", line 184, in _shareBookmark
>    self._dispatchEmailTo(email, nID)
>  File "/Users/ciurana/development/AppEngine/bookmarksbin/
> bookmarksbin.py", line 176, in _dispatchEmailTo
>    message.send()
>  File "/Users/ciurana/Documents/publishing/Apress/GoogleAppEngine/
> GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-
> default.bundle/Contents/Resources/google_appengine/google/appengine/
> api/mail.py", line 474, in send
>    make_sync_call('mail', self._API_CALL, message, response)
>  File "/Users/ciurana/Documents/publishing/Apress/GoogleAppEngine/
> GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-
> default.bundle/Contents/Resources/google_appengine/google/appengine/
> api/apiproxy_stub_map.py", line 46, in MakeSyncCall
>    stub.MakeSyncCall(service, call, request, response)
>  File "/Users/ciurana/Documents/publishing/Apress/GoogleAppEngine/
> GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-
> default.bundle/Contents/Resources/google_appengine/google/appengine/
> api/mail_stub.py", line 62, in MakeSyncCall
>    attr(request, response)
>  File "/Users/ciurana/Documents/publishing/Apress/GoogleAppEngine/
> GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-
> default.bundle/Contents/Resources/google_appengine/google/appengine/
> api/mail_stub.py", line 217, in _Send
>    self._SendSMTP(mime_message, smtp_lib)
>  File "/Users/ciurana/Documents/publishing/Apress/GoogleAppEngine/
> GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-
> default.bundle/Contents/Resources/google_appengine/google/appengine/
> api/mail_stub.py", line 153, in _SendSMTP
>    smtp.sendmail(mime_message['From'], tos, str(mime_message))
>  File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/
> python2.5/email/message.py", line 116, in __str__
>    return self.as_string(unixfrom=True)
>  File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/
> python2.5/email/message.py", line 128, in as_string
>    from email.Generator import Generator
> SystemError: Parent module 'email' not loaded
>
> INFO     2008-11-04 16:20:40,314 dev_appserver.py] "POST / HTTP/1.1"
> 500
>
> The code that dispatches the email:
>
>  def _dispatchEmailTo(self, email, nID):
>    owner = Owner.getCurrent()
>    bookmark = memcache.get(self._bookmarkKey(nID))
>
>    if bookmark is None:
>      bookmark = Bookmark.get_by_id(nID, owner)
>      memcache.set(self._bookmarkKey(nID), bookmark)
>
>    message = mail.EmailMessage(
>        sender = owner.email,
>        subject = "BookmarksBin shared link")
>
>    message.to = email
>    message.body = """
>       Hello,
>
>       A BookmarksBin user thought you may enjoy
>       reading this:
>       """
>
>    message.body += bookmark.locator
>
>    message.send()
>    logging.info("Email to "+email+" sent")
>
> (This is testing code; the actual email will be generated from a
> template.  Please ignore the fugliness of that part.)
>
> Take care and cheers,
>
> pr3d4t0r
> http://eugeneciurana.com
> http://isthesiteup.com
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to