Mac upload problems with Google App Engine

I kept getting errors uploading to Google App Engine on Mac.

ERROR appcfg.py:1128 An unexpected error occurred. Aborting.

I run as a normal user. Apparently appcfg.py requires some elevated privileges, as running it as root uploaded without a problem.

Here is the command to run the appcfg.py inside the GoogleAppEngineLauncher app.

sudo /Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/appcfg.py update appdirectory/ --noisy -v --email username@gmail.com

Substitute your own appdirectory and username and path to the GoogleAppEngineLauncher.app.