Software and hardware engineering

Sun 28 August 2011 Posted by Matt Williamson in Workarounds

App Engine ClientLoginError

I’m using a pretty specific set of tools and I’ve come across an error that I couldn’t find a solution to, so I hacked my way out of it. I’m using django-nonrel to run Django on App Engine, while preserving some important features, like the admin app. I’m also using a Google Apps account (xxxx@appdelegateinc.com) as my App Engine account and I do my development on a Mac. When I try to run python manage.py remote createsuperuser to create a new user on the App Engine hosted app, I get the following error:

google.appengine.tools.appengine_rpc.ClientLoginError: HTTP Error 403: Forbidden

Full Traceback

I followed the traceback down to an App Engine SDK file which seems to not set a variable correctly. So I opened it up and hacked and got it working correctly.

edit

/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/appengine_rpc.py

And change the line:

account_type = "GOOGLE"

To

account_type = "HOSTED_OR_GOOGLE"

Here's the diff

/google/appengine/tools/appengine_rpc.py
206c206
<         account_type = "GOOGLE"
---
>         account_type = "HOSTED_OR_GOOGLE"