Giter VIP home page Giter VIP logo

app-engine-start-vm's People

Contributors

blakewest avatar fivunlm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

app-engine-start-vm's Issues

"TypeError: unsupported operand type" when refreshing initial access_token

Firstly, thanks for your excellent project! This is a rare find for restarting Compute Engines automatically.

Unfortunately, I can't run your code properly. When I open /vm/start using dev_appserver.py $PWD, I get a HTTP 500 error. This is the traceback

INFO     2017-07-22 10:24:57,971 discovery.py:273] URL being requested: GET https://www.googleapis.com/discovery/v1/apis/compute/v1/rest?userIp=127.0.0.1
INFO     2017-07-22 10:24:57,971 transport.py:157] Attempting refresh to obtain initial access_token
ERROR    2017-07-22 10:24:57,986 api_server.py:402] Exception while handling service_name: "app_identity_service"
method: "GetAccessToken"
request: "\n5https://www.googleapis.com/auth/devstorage.read_write"
request_id: "JUKaAPsqgy"
Traceback (most recent call last):
  File "/google/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/api_server.py", line 377, in _handle_POST
    api_response = _execute_request(request).Encode()
  File "/google/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/api_server.py", line 227, in _execute_request
    make_request()
  File "/google/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/api_server.py", line 222, in make_request
    request_id)
  File "/google/google-cloud-sdk/platform/google_appengine/google/appengine/api/apiproxy_stub.py", line 141, in MakeSyncCall
    method(request, response)
  File "/google/google-cloud-sdk/platform/google_appengine/google/appengine/api/app_identity/app_identity_defaultcredentialsbased_stub.py", line 200, in _Dynamic_GetAccessToken
    'expires': now + token.expires_in,
TypeError: unsupported operand type(s) for +: 'int' and 'NoneType'
INFO     2017-07-22 10:24:57,998 module.py:832] default: "GET /vm/start HTTP/1.0" 500 291

Steps to reproduce (inside Google Cloud Shell):

STARTVMDIR=~/src/app-engine-start-vm
git clone https://github.com/fivunlm/app-engine-start-vm.git $STARTVMDIR
cd $STARTVMDIR
mkdir lib
pip install -t lib/ -r requirements.txt
vim app.yaml
vim main.py
dev_appserver.py $PWD

(The first few steps, where I use environment variables, are copied from App Engine's "Hello World" Python tutorial.)

Do you know how to fix this?

Revise version constraint of httplib2, to avoid potential dependency conflicts

Hi, as shown in the following full dependency graph of app-engine-start-vm, app-engine-start-vm requires httplib2 (the latest version), while the installed version of google-api-python-client(1.7.10) requires httplib2>=0.9.2,<1dev.

According to Pip's “first found wins” installation strategy, httplib2 0.13.1 is the actually installed version.

Although the first found package version httplib2 0.13.1 just satisfies the later dependency constraint (httplib2>=0.9.2,<1dev), it will lead to a build failure once developers release a newer version of httplib2.

Dependency tree--------

app-engine-start-vm(version range:)
| +-flask(version range:==0.12)
| +-google-api-python-client(version range:)
| | +-httplib2(version range:>=0.9.2,<1dev)
| | +-google-auth(version range:>=1.4.1)
| | +-google-auth-httplib2(version range:>=0.0.3)
| | +-six(version range:>=1.6.1,<2dev)
| | +-uritemplate(version range:>=3.0.0,<4dev)
| +-httplib2(version range:)
| +-oauth2client(version range:)
| | +-httplib2(version range:>=0.9.1)
| | +-pyasn1(version range:>=0.1.7)
| | +-pyasn1-modules(version range:>=0.0.5)
| | +-rsa(version range:>=3.1.4)
| | +-six(version range:>=1.6.1)

Thanks for your attention.
Best,
Neolith

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.