When I try to deploy my app I get the following error:
Starting update of app: flyingbat123, version: 0-1 Getting current resource limits. Password for avigmati: Traceback (most recent call last): File "C:\Program Files (x86)\Google\google_appengine\appcfg.py", line 125, in run_file(__file__, globals()) File "C:\Program Files (x86)\Google\google_appengine\appcfg.py", line 121, in run_file execfile(script_path, globals_) File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 4062, in main(sys.argv) File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 4053, in main result = AppCfgApp(argv).Run() File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 2543, in Run self.action(self) File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 3810, in __call__ return method() File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 3006, in Update self.UpdateVersion(rpcserver, self.basepath, appyaml) File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 2995, in UpdateVersion self.options.max_size) File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 2122, in DoUpload resource_limits = GetResourceLimits(self.rpcserver, self.config) File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 355, in GetResourceLimits resource_limits.update(GetRemoteResourceLimits(rpcserver, config)) File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 326, in GetRemoteResourceLimits version=config.version) File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appengine_rpc.py", line 379, in Send self._Authenticate() File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appengine_rpc.py", line 437, in _Authenticate super(HttpRpcServer, self)._Authenticate() File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appengine_rpc.py", line 281, in _Authenticate auth_token = self._GetAuthToken(credentials[0], credentials[1]) File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appengine_rpc.py", line 233, in _GetAuthToken e.headers, response_dict) File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appengine_rpc.py", line 94, in __init__ self.reason = args["Error"] AttributeError: can't set attribute 2012-04-25 19:30:15 (Process exited with code 1)
The following is my app.yaml:
application: flyingbat123 version: 0-1 runtime: python api_version: 1 threadsafe: no
It seems like an authentication error, but I'm entering a valid email and password. What am I doing wrong?
I had the same problem.
I'm using 2 factor authentication for my google account, so I previously had to enter a application specific password to deploy apps to GAE. If I entered my normal google password I got the AttributeError: can't set attribute
error. However when I created an application specific password and used it, it worked
The error message indicates that there is a bug in our SDK. Because of this bug, you can not see the reason of the failure. However, this code block is called only when the authentication request ends up with 403 HTTP error.
You can temporary tweak the file C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appengine_rpc.py as follows to see the actual reason(add logger.warn(body)
line).
except urllib2.HTTPError, e:
if e.code == 403:
body = e.read()
# Add a line bellow to see the actual error
logger.warn(body)
response_dict = dict(x.split("=", 1) for x in body.split("\n") if x)
raise ClientLoginError(req.get_full_url(), e.code, e.msg,
e.headers, response_dict)
else:
raise
Once if you find the reason, this issue must be much easier to solve. After you solve the problem, I'd appreciate it if you could create an issue about this mysterious error message in our issue tracker?
I know this doesn't answer the OP question, but it may help others who experience problems using --oauth2
mentioned by others in this question.
I have 2-step verification enabled, and I had been using the application-specific password, but found it tedious to look up and paste the long string every day or so. I found that using --oauth2
returns
This application does not exist (app_id=u'my-app-id')
but by adding the --no_cookies
option
appcfg.py --oauth2 --no_cookies update my-app-folder\
I can now authenticate each time by just clicking [Allow access] in the browser window that is opened.
I'm using Python SDK 1.7.2 on Windows 7
NOTE: I found this solution elsewhere, but I can't remember where, so I can't properly attribute it. Sorry.
.
I had the same problem and after inserting logger.warn(body), I get this:
WARNING appengine_rpc.py:231 Error=BadAuthentication
Info=InvalidSecondFactor
The standard error message could have been more helpful, but this makes me wonder if I should not use an application specific password?
Add the --oauth2 flag to appcfg.py update for an easier fix
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With