dev-appserver

Appengine multiple modules local dev - Java

℡╲_俬逩灬. 提交于 2019-12-24 09:38:51
问题 I have 3 java modules using Google Appengine Standard: The first one module uses Java 7 with Servlet 2.5 + web.xml + Spring 4 The second module uses Java 8 with Servlet 3.1 without web.xml + Spring 5 using WebApplicationInitializer. The third module is just to frontend files (HTML,CSS). I have a dispatch.yaml that contains route for each module. If I run only java8 module using: mvn appengine:run OR /usr/lib/google-cloud-sdk/bin/java_dev_appserver.sh, It is ok, the modules run. If I use: dev

NDB Query builder doesn't work as expected

眉间皱痕 提交于 2019-12-24 06:47:19
问题 I have the following query in my application query = cls.query().filter(cls.taskgroup_id == taskgroup_id, cls.availability == True, cls.task_id > min_task_id).order(cls.task_id) query.fetch(1) Above works fine as expected. (Fetches only those entities, which match taskgroup_id, and is available, and task_id > min_task_id) However, when I break query into multiple statements. query = cls.query() query.filter(cls.taskgroup_id == taskgroup_id) query.filter(cls.availability == True) query.filter

ImportError when running dev_appserver.py from pycharm

点点圈 提交于 2019-12-13 13:18:56
问题 I'm using the latest version of pycharm 2018.2, on Windows. I've also updated the Google Cloud Sdk to the latest versions too. When I use the built in App Engine run configuration in Pycharm: I get an import error ImportError: cannot import name _common appearing in the run window: "C:\Program Files\JetBrains\PyCharm 2018.1.1\bin\runnerw.exe" C:\Code\my- project\env\Scripts\python.exe "C:/Program Files (x86)/Google/Cloud SDK/google-cloud-sdk/bin/dev_appserver.py" --port 8484 app.yaml tasks

I can't create a Google Cloud Storage file working on “dev_appserver.py.”

你说的曾经没有我的故事 提交于 2019-12-12 22:11:07
问题 I caught an error as below. INFO ~ module.py:639] default: "HEAD /_ah/gcs/app_default_bucket/multibytes.txt HTTP/1.1" 404 - ERROR ~ gcs.py:99] Expect status [200] from Google Storage. But got status 404. Path: '/app_default_bucket/multibytes.txt'. Request headers: None. Response headers: {'date': 'Mon, 07 Jul 2014 12:59:44 GMT', 'server': 'Development/2.0', 'connection': 'close'}. Body: ''. Extra info: None. Traceback (most recent call last): File "/gcs.py", line 97, in status stat = gcs.stat

Google datastore backup to local dev_appserver

不打扰是莪最后的温柔 提交于 2019-12-12 04:27:11
问题 I'm trying to follow those instructions: https://gist.github.com/jehna/3b258f5287fcc181aacf I've downloaded my backup, made the script go to the path but it seems like the code won't get into the loop "for record in reader:" on windows. I read about it and from my impression it has to do with to format of the file (leveldb) which is not supported in windows that good. Do you have any insights/solutions about that? Thanks 回答1: This code work on windows when chaging file openning permissions

Why is GAE dev_appserver only setting ETag, but not Expires HTTP header?

自古美人都是妖i 提交于 2019-12-12 03:03:24
问题 File & Folder Structure I have the following directory structure. [app_root] | |---[static] | |--- [css] |--- [img] |--- [js] |--- [app] |--- [libs] |--- main.js |--- require.js App.yaml The app.yaml config for static_dir handlers are set to different expiration time. application: my-app-name version: 1 runtime: python27 api_version: 1 threadsafe: true default_expiration: "10d" handlers: - url: /favicon\.ico static_files: static/img/favicon.ico upload: static/img/favicon\.ico expiration:

App Engine no output in browser

冷暖自知 提交于 2019-12-11 07:43:41
问题 Running app engine local server with a Wordpress for App Engine build and using a Sage theme. Installed all dependencies and gulp build task seems to run ok. Then run dev_appserver.py and check browser (Chrome) at localhost:8080. Browser shows blank screen. I inspect the blank page and it shows there is no html. Not sure what to check next, or what may be the cause? (Edit) App Engine dev console log This is what happens when I run dev_appserver.py and hit refresh in browser a couple of times:

Moved Permanently error when running dev_appserver.py

谁都会走 提交于 2019-12-10 19:03:59
问题 I am trying the basic helloworld example (https://developers.google.com/appengine/docs/python/gettingstartedpython27/helloworld) and keep getting the HTTP Error 301: Moved Permanently error whenever I try to test my code using dev_appserver.py The 2 files I have are copied and pasted exactly from the developers.google.com site. I have included the location of where dev_appserver.py is in both PATH and PYTHONPATH I am running this on Linux with python 2.7.3 and appengine v1.8.4 The output on

GAE: python code to check if i'm on dev_appserver or deployed to appspot

时光毁灭记忆、已成空白 提交于 2019-12-10 17:16:06
问题 My GAE app uses OAUTH 2. Currently, I manually switch the redirect_uri between http://localhost:8081/oauth2callback and myapp.appspot.com/oauth2callback depending on whether do local testing with dev_appserver or if I deploy to appspot.com. Is there some code (e.g. using os.environ ) that I can use to automate this? Thanks! 回答1: You can get you current domain name with os.environ['SERVER_NAME'] . You also can check this by version name: import os if os.environ['APPLICATION_ID'].startswith(

Why can not i run a google app engine project on localhost?

眉间皱痕 提交于 2019-12-09 18:18:24
问题 I am using macbook pro for development. I just installed eclipse indigo. Google app engine Java SDK is 1.8.2. I am trying to run an appengine project on localhost. But i am getting the following error: 2013-08-04 13:14:03.193 java[2146:707] [Java CocoaComponent compatibility mode]: Enabled 2013-08-04 13:14:03.194 java[2146:707] [Java CocoaComponent compatibility mode]: Setting timeout for SWT to 0.100000 Usage: <dev-appserver> [options] <app directory> Options: --help, -h Show this help