Ok, an update.

I deployed a new version called "test" and added the bot
[email protected].

I got responses from that deployment.

So, I added [email protected].  I get responses from
this bot, which is the default deployment.

Turns out, I had a typo in the IM address I used to add to my
contacts.. I used [email protected] instead of [email protected].
The contact was "Active" so I assumed I got the address correct and
never thought I messed up the app ID in the address. :(  Oh well..
sorry to waste your time.  I wonder if someone else has an app ID of
jacob6??  Why did it go active?

Barry



On Sep 4, 11:24 am, bvelasquez <[email protected]> wrote:
> Hello Nick,
>
> Sorry for the confusion.  I meant to say that even the default
> unknown_command is not responding with the default response.  I'm sure
> it's configuration, so I'm trying various config. changes.  Let me
> know if something stands out below.
>
> The app ID is jacob-6.
>
> My bot.py source is below:
>
> import logging
> import os
> import re
> import sys
>
> from google.appengine.ext import webapp
> from google.appengine.ext.webapp.util import run_wsgi_app
>
> from gaeo.dispatch import dispatcher
> from google.appengine.api import xmpp
> from google.appengine.ext.webapp import xmpp_handlers
>
> # Handle bot requests
> class XmppHandler(xmpp_handlers.CommandHandler):
>         def hello_command(self, message=None):
>                 logging.info("XMPP Received.")
>                 message.reply("Hello Back!")
>
> app = webapp.WSGIApplication([('/_ah/xmpp/message/chat/',
> XmppHandler)], debug=True)
>
> def main():
>         run_wsgi_app(app)
>
> if __name__ == '__main__':
>         main()
>
> My app.yaml is as follows:
>
> handlers:
> - url: /css
>   static_dir: assets/css
> - url: /js
>   static_dir: assets/js
> - url: /img
>   static_dir: assets/img
> - url: /snips
>   static_dir: assets/snips
> - url: /favicon.ico
>   static_files: favicon.ico
>   upload: favicon.ico
> - url: /robots.txt
>   static_files: robots.txt
>   upload: robots.txt
> - url: /remote_api
>   script: $PYTHON_LIB/google/appengine/ext/remote_api/handler.py
>   login: admin
> - url: /_ah/xmpp/message/chat/.*
>   script: bot.py
> - url: .*
>   script: main.py
>
> inbound_services:
> - xmpp_message
>
> I added the url /_ah/xmpp/message/chat/.* to point to bot.py.  Maybe
> it should be /_ah/xmpp/message/.*?  I'll try that.  This needs to run
> alongside my current site.
>
> On Sep 4, 6:56 am, "Nick Johnson (Google)" <[email protected]>
> wrote:
>
> > Hi bvelasquez,
> > In your first message you said you weren't getting any response at all - but
> > now you seem to be implying that it's only the unknown_command method that
> > isn't working - which is the case? Can you show us your code and your App
> > ID, please?
>
> > -Nick Johnson
>
> > On Fri, Sep 4, 2009 at 2:52 PM, bvelasquez <[email protected]> wrote:
>
> > > Yup. Did that.  Followed every step which are few. The bot does not
> > > respond with the default message for unknown commands when I used the
> > > xmpp command handler.
>
> > > On Sep 4, 6:40 am, Jérémy Selier <[email protected]> wrote:
> > > > Hello,
>
> > > > Did you add inbound_services in your app.yaml to activate the XMPP
> > > > service in order to receive messages ?
> > > > See:
> > >http://code.google.com/intl/fr-FR/appengine/docs/python/xmpp/overview...
>
> > > > --
> > > > Jeremy
>
> > > > On Sep 4, 7:21 am, bvelasquez <[email protected]> wrote:
>
> > > > > Hello,
>
> > > > > I gave the XMPP API a try and it does not work for me.  The bot is
> > > > > active and in my IM contact list.  I created the post handler
> > > > > following the API instruction:
>
> > > > > class XmppHandler(webapp.RequestHandler):
> > > > >         def post(self):
> > > > >                 logging.info("XMPP Received.")
> > > > >                 message = xmpp.Message(self.request.POST)
> > > > >                 if message.body[0:5].lower() == 'hello':
> > > > >                         message.reply("Greetings!")
> > > > >                 else:
> > > > >                         message.reply("I have no idea.")
>
> > > > >         def get(self):
> > > > >                 self.response.out.write("Hello")
>
> > > > > I even added a "get" method to make sure the handler is setup
> > > > > properly.  The GET is handled ok and returns Hello in the browser.
>
> > > > > I get no log message from the "logging.info()" call I make.  No errors
> > > > > in the log also.
>
> > > > > Anyone try this yet or have success?
>
> > > > > Barry
>
> > --
> > Nick Johnson, Developer Programs Engineer, App Engine
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to