Alright...a final follow up. I adhered to your directions, Nick, taking the "http://" out of the severname I was passing into the ConfigureRemoteDatastore method and everything works now. I wrote a Python definition/mapping for the entity kind my app deals with and can now remotely pull entities using your demo console. Awesome! Really, a commendable little api you have put together. It's gonna keep me from having to come up with a clumsy, nasty workaround for that 30 second process deadline and also from digging too far into my quotas for things I can easily do on a local machine. Thanks again, Nick Z
On Aug 4, 7:38 pm, Nick_Zaillian <nzaill...@gmail.com> wrote: > disregard that last message -- I hadn't seen your response yet when I > wrote it. I'm going to get back to work and let you know what > happens. > Best, > Nick Z > > On Aug 4, 7:35 pm, Nick_Zaillian <nzaill...@gmail.com> wrote: > > > One more thing: I removed the trailing slash from the > > "servername='http://2.latest.nicksmap.appspot.com/" (because it > > clearly doesn't belong there) that I'm passing into the > > ConfigureRemoteDatastore method, but am still getting the same > > error. > > -Nick > > > On Aug 4, 7:05 pm, Nick_Zaillian <nzaill...@gmail.com> wrote: > > > > to clarify: when I said "The console view gives me access to the > > > datastore" in that last message, I meant the data viewer at > > > appengine.google.com, not appengine_console.py. > > > -Nick > > > > On Aug 4, 7:00 pm, Nick_Zaillian <nzaill...@gmail.com> wrote: > > > > > Thanks Nick J, > > > > Alright. This is probably just me being stupid, but I've been beating > > > > my head against the wall for, like, an hour trying to get things > > > > working. I wrote a simple app.yaml file with your remote_api mapping > > > > and deployed it to App Engine as v2 of my app. The console view gives > > > > me access to the datastore, so I think this is all fine. > > > > I modified your appengine_console.py such that the call to > > > > ConfigureRemoteDatastore now reads: > > > > > remote_api_stub.ConfigureRemoteDatastore(app_id=None, path='/ > > > > remote_api', auth_func=auth_func, servername='http:// > > > > 2.latest.nicksmap.appspot.com/') > > > > > I've visited the url "http://2.latest.nicksmap.appspot.com/remote_api" > > > > in my browser and it seems to be active (I see "This request did not > > > > contain a necessary header" rather than some 403/404 error message) so > > > > I'm pretty sure that my app configuration is alright. When I run > > > > "python appengine_console.py [appid]" (with my app id -- though I know > > > > that last argument doesn't really do anything anymore) in the shell, I > > > > get an error message reading as follows: > > > > > Traceback (most recent call last): > > > > File "appengine_console.py", line 27, in <module> > > > > remote_api_stub.ConfigureRemoteDatastore(app_id=None, path='/ > > > > remote_api', auth_func=auth_func, servername='http:// > > > > 2.latest.nicksmap.appspot.com/') > > > > File "/home/nick/google_appengine/google/appengine/ext/remote_api/ > > > > remote_api_stub.py", line 433, in ConfigureRemoteDatastore > > > > response = server.Send(path, payload=None, **urlargs) > > > > File "/home/nick/google_appengine/google/appengine/tools/ > > > > appengine_rpc.py", line 344, in Send > > > > f = self.opener.open(req) > > > > File "/usr/lib/python2.5/urllib2.py", line 381, in open > > > > response = self._open(req, data) > > > > File "/usr/lib/python2.5/urllib2.py", line 399, in _open > > > > '_open', req) > > > > File "/usr/lib/python2.5/urllib2.py", line 360, in _call_chain > > > > result = func(*args) > > > > File "/usr/lib/python2.5/urllib2.py", line 1107, in http_open > > > > return self.do_open(httplib.HTTPConnection, req) > > > > File "/usr/lib/python2.5/urllib2.py", line 1064, in do_open > > > > h = http_class(host) # will parse host:port > > > > File "/usr/lib/python2.5/httplib.py", line 639, in __init__ > > > > self._set_hostport(host, port) > > > > File "/usr/lib/python2.5/httplib.py", line 651, in _set_hostport > > > > raise InvalidURL("nonnumeric port: '%s'" % host[i+1:]) > > > > httplib.InvalidURL: nonnumeric port: '' > > > > > Not really sure what's going on here. I think that the parameters > > > > that I'm passing to the ConfigureRemoteDatastore method are valid, > > > > right? Any thoughts? > > > > > I'm sure thatRemoteAPIis a great tool and I'm eager to be able to > > > > work with it. > > > > > - Nick Z > > > > > On Aug 4, 8:04 am, "Nick Johnson (Google)" <nick.john...@google.com> > > > > wrote: > > > > > > Hi Nick, > > > > > > If you're happy to use a Python local client, you can do the > > > > > following: > > > > > > - Create a Python app.yaml with the same app_id as your Java app, but > > > > > a different major version. > > > > > - Install the remote_api mapping in the app.yaml > > > > > - Deploy the Python app to App Engine > > > > > - When you initialize remote_api with ConfigureRemoteDatastore, pass > > > > > the parameter server="majorversion.latest.myapp.appspot.com" > > > > > (substituting majorversion and latest as appropriate). > > > > > > You can now access your Java app's datastore via PythonRemoteAPI. > > > > > > -Nick Johnson > > > > > > On Tue, Aug 4, 2009 at 3:19 AM, Nick_Zaillian<nzaill...@gmail.com> > > > > > wrote: > > > > > > > Just to clarify: I wouldn't mind working in Python on the local end > > > > > > of > > > > > > things if that were necessary (because that would just mean > > > > > > rewriting > > > > > > one or two routines). What I am unwilling to do is to rewrite my > > > > > > whole application in Python just so that I can make use of theRemote > > > > > >API/AppRocker/App3. It looks to me likeRemoteAPI, AppRocket and > > > > > > app3 are all just python scripts, so I'm not too hopeful about the > > > > > > prospect of integrating them with my java app. App3 is probably the > > > > > > closest thing to what I'm looking for. It occurs to me that it may > > > > > > not be so complicated to implement this sort thing in java on my > > > > > > own, > > > > > > so I may just go ahead and try to do that...unless someone has a > > > > > > better idea. > > > > > > Cheers, > > > > > > Nick > > > > > > > On Aug 3, 11:58 pm, Nick_Zaillian <nzaill...@gmail.com> wrote: > > > > > >> I would like to be able to do some batch processing for a site I'm > > > > > >> running on GAE (at nicksmap.org). Right now I've got various > > > > > >> database > > > > > >> maintenance routines bound to URLs that I hit with cron. Problem > > > > > >> is > > > > > >> that one of these routines requires a few minutes to excecute. And > > > > > >> can (and sort of have) hacked up a workaround, but I would be able > > > > > >> to > > > > > >> stretch my quotas much further if I could use something likeRemote > > > > > >>API, App Rocket, or app3. So far as I can tell, though, all of > > > > > >>these > > > > > >> tools are python only (or am I mistaken?). Any thoughts on how I > > > > > >> might be able to accomplish what I'm trying to accomplish > > > > > >> (basically > > > > > >> be able to take a hunk of records from my database and run some > > > > > >> time- > > > > > >> consuming routines on them on a local machine so as not to have to > > > > > >> hack around the 30 second cutoff for processes)? > > > > > >> Thanks, > > > > > >> Nick Zaillian > > > > > > -- > > > > > 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 google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~----------~----~----~----~------~----~------~--~---