GAE - Deployment Error: “AttributeError: can't set attribute”

前端 未结 6 1698
有刺的猬
有刺的猬 2021-02-14 02:44

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: Trac         


        
相关标签:
6条回答
  • 2021-02-14 02:57

    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?

    0 讨论(0)
  • 2021-02-14 02:59

    This also happens if your default_error value overlaps with your static_dirs in app.yaml.

    0 讨论(0)
  • 2021-02-14 03:01

    Add the --oauth2 flag to appcfg.py update for an easier fix

    0 讨论(0)
  • 2021-02-14 03:22

    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

    0 讨论(0)
  • 2021-02-14 03:23

    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.

    .

    0 讨论(0)
  • 2021-02-14 03:24

    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?

    0 讨论(0)
提交回复
热议问题