Hi SDC,

On Sun, Sep 27, 2009 at 3:53 AM, SDC <[email protected]> wrote:

>
> I have a project which requires uploading a ton of data I have
> collected. The Remote API seems like the ticket.
>

The bulkloader, which uses remote_api, is a better bet here.


>
> Being generally a good citizen I want to try this on my development
> environment before going nuts on the Google server. However despite
> much Googling, no joy.
>
> More specifics: it would seem Nick Johnson's article is as good a
> starting point as any (I've seen numerous other tutorials etc):
> http://code.google.com/appengine/articles/remote_api.html
>
> I set up the interactive console as he described. I have a super
> simple app (again, before going nuts with the actual app, let's just
> get a toy example going) called 'remotetest' running on port 8091
> launched via the MacOSX GAE launcher. I have a main.py, in that a
> model 'Greeting' (as in the hello world thingy).
>
> app.yaml has these lines:
>
> - url: /remote_api
>  script: /Applications/GoogleAppEngineLauncher.app/Contents/Resources/
> GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
> google/appengine/ext/remote_api/handler.py
>

The script URL here should be literally what was in the remote_api article -
don't put the full path to your SDK here.


> OK, simple enough. I run it as:
>
> python appengine_console.py remotetest localhost:8091
>

A remote_api_console.py is now bundled with the SDK. Try running
"remote_api_console.py -s localhost:8091 remotetest" instead.


>
> (this wasn't totally clear but it didn't gripe)
>
> Then:
>
> Username:
> Password:
> App Engine interactive console for remotetest
> >>> import main
> >>> from google.appengine.ext import db
> >>> main.Greeting(content='yo').put()
> Traceback (most recent call last):
>  File "<console>", line 1, in <module>
>  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/
> GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
> google/appengine/ext/db/__init__.py", line 785, in put
>    return datastore.Put(self._entity)
>  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/
> GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
> google/appengine/api/datastore.py", line 169, in Put
>    apiproxy_stub_map.MakeSyncCall('datastore_v3', 'Put', req, resp)
>  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/
> GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
> google/appengine/api/apiproxy_stub_map.py", line 72, in MakeSyncCall
>    apiproxy.MakeSyncCall(service, call, request, response)
>  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/
> GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
> google/appengine/api/apiproxy_stub_map.py", line 255, in MakeSyncCall
>    rpc.CheckSuccess()
>  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/
> GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
> google/appengine/api/apiproxy_rpc.py", line 111, in CheckSuccess
>    raise self.exception
> HTTPError: HTTP Error 404: Not Found
> >>>
>
> OK so it's not found.


It's likely you put the remote_api handler _after_ your .* handler in
app.yaml - in which case it will never get hit, and the 404 is being
returned by your main app.


> Also w/ the authenticating, that also isn't
> clear: why authenticate against the development server? Even if you
> did, what username/password would you use? Surely not yr gmail
> account? Things are not clear.
>

Any username and password will work for the dev server.

-Nick Johnson


>
> Thanks in advance, and so on. Have had luck w/ past forays into Google
> App Engine (indicating my environment is not hopelessly broken), just
> no luck on this one.
>
> SDC
> >
>


-- 
Nick Johnson, Developer Programs Engineer, App Engine
Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number:
368047

--~--~---------~--~----~------------~-------~--~----~
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