Google has deprecated its Backends API and has been telling all users to migrate to the Modules API for GAE projects.
After updating my app.yaml and clicking the migrate button in the Application Settings>Performance page, my application is still giving me this error:
WARNING 2014-08-26 13:49:57,888 backends.py:55] The Backends API is deprecated and will be removed in a future release. Please migrate to the Modules API as soon as possible.
Why is GAE still identifying my application as using the Backends API?
My app.yaml file:
application: app-name
version: baseline
runtime: python27
api_version: 1
threadsafe: true
instance_class: F4
automatic_scaling:
max_idle_instances: 10
min_pending_latency: 10ms
max_pending_latency: 8s
builtins:
- deferred: on
- admin_redirect: on
- appstats: on
- remote_api: on
includes:
- config/index.master.yaml
libraries:
- name: jinja2
version: latest
- name: lxml
version: latest
- name: webob
version: latest
- name: numpy
version: latest
- name: webapp2
version: latest
- name: ssl
version: latest
- name: pycrypto
version: latest
skip_files:
- ^(.*/)?.*\.coffee
- ^(.*/)?.*\.scss
- ^(.*/)?app\.yaml
- ^(.*/)?app\.yml
- ^(.*/)?index\.yaml
- ^(.*/)?index\.yml
- ^(.*/)?#.*#
- ^(.*/)?.*~
- ^(.*/)?.*\.py[co]
- ^(.*/)?.*/RCS/.*
- ^(.*/)?\..*
- ^/docs*
Edit. My app is not importing the backends module directly, but appears to be importing it directly through the Admin Panel library. The error is triggered whenever the admin panel page is loaded, using this script handler:
- url: /googleadmin.*
script: google.appengine.ext.admin.application
login: admin
Could it be you still have a backend import somewhere in your code?
Looking at the warning, seems like you're still using "backends.py"
One interesting thing that happened in my team when we were working on different projects is that we received these deprecated calls on APIs we didn't EVEN use. Seems like internally some "new" APIs use the deprecated ones, which can cause these errors. I don't think it's risky or dangerous, but definitely not the behaviour one would expect.
Related
I am unable to set manual scaling on a google app engine service (Previously called module). Using python on app engine.
app.yaml:
application: xxx-xxxx
version: 2
runtime: python27
module: xxbackend
instance_class: F4
api_version: 1
threadsafe: true
handlers:
- url: /taskcontroller\.py
script: TaskController.app
so on...
libraries:
- name: webapp2
version: latest
- name: numpy
version: "1.6.1"
- name: PIL
version: latest
inbound_services:
- warmup
xxbackend.yaml:
application: xxx-xxxx
version: uno
module: xxbackend
runtime: python27
api_version: 1
instance_class: B4
manual_scaling:
instances: 5
Even though I have specified instance class and manual scaling settings in xxbackend.yaml, the xxbackend instances are still autoscaled. Can someone point out where I am going wrong?
You have the same module: name is both yamls. app.yaml should not specify a module, so it uses the default module. So remove module: xxbackend from app.yaml. Otherwise, you are overriding the expected config.
Then, when you deploy, use a command like:
appcfg.py update app.yaml xxbackend.yaml
That deploys both updated yaml files.
I am successfully using Pycrypto vs. 2.6 in my GAE development environment under Python 2.7. However, deploying it to Google production I see the following error in the logs:
from Crypto.Cipher import _AES ImportError: cannot import name _AES
My App.Yaml:
application: appname
version: 1
runtime: python27
api_version: 1
threadsafe: yes
handlers:
- url: /favicon\.ico
static_files: favicon.ico
upload: favicon\.ico
- url: .*
script: main.app
secure: always
libraries:
- name: webapp2
version: "2.5.2"
- name: pycrypto
version: "2.6"
The Python call in question:
from Crypto.Cipher import AES
Checking Google support documents and they do list Pycrypto 2.6 as supported. I also tried to enter "latest" for the version and received the same error. Again in development GAE on my local machine it works perfectly.
Issue resolved. I had a directory from my Windows installation called "Crypto" in my App Engine project directory. When the app loader loaded the files it also included this directory which conflicted with what Google has loaded in production. Removal of this directory from the local project directory resolved the problem upon the next push to Google.
I'm new in GAE development, I've just created a simple API but I'm unable to run my app, because I keep getting the error No URLMap entries found in application configuration.
Here's my app.yaml file
application: gw2
version: 1
runtime: python27
threadsafe: true
api_version: 1
handlers:
- url: /_ah/spi/.*
script: main.api_server
libraries:
- name: pycrypto
version: latest
- name: endpoints
version: 1.0
And here is my main.py file where I've declared the api_server variable
from google.appengine.ext import endpoints
import api
api_server = endpoints.api_server([api.GW2Service])
GW2Service inherits from remote.Service
Edit I'm using command line tools (Ubuntu 12.04)
Where's the mistake?
Thanks in advance. Eric ~H
You start server from the app or command line?
Try using "import endpoints" not from ... import endpoints
In app.yaml set endpoints version to latest.
Move GW2Service to main.py and test if server is ok. The problem might be generated by file name "api".
I'm attempting to create endpoints for my google-app-engine in Python. I've followed the directions on https://developers.google.com/appengine/docs/python/endpoints/ and when I attempt to upload I am getting the following message:
Host: appengine.google.com Error parsing yaml file: the library
"endpoints" is not supported in "guestbook/app.yaml", line 22,
column 1
I believe I've got everything configured correctly, can anyone point me in the right direction? I believe having the library import for "endpoints" is critical for this to function.
Here is my app.yaml file:
application: xxxxxxx
version: 1
runtime: python27
api_version: 1
threadsafe: true
handlers:
- url: /_ah/spi/.*
script: enders.application
- url: /stylesheets
static_dir: stylesheets
- url: /.*
script: main.app
secure: always
libraries:
- name: endpoints
version: "1.0"
- name: pycrypto
version: "2.6"
- name: webapp2
version: latest
- name: jinja2
version: latest
Make sure you're using the most recent version of the AppEngine SDK. Cloud Endpoints was moved to a library in version 1.8.5.
lucemia pushed me down the right path. I had two versions of the SDK so I removed the older version and voila, problem solved.
I'm working on my first GAE project and I'm having some trouble getting custom pages to show up in the Admin Console. I'm following the Google Docs on it, but it doesn't seem to be working for me. I have a feeling it could have something to do with this note:
Note: Only custom pages defined by the default version will be shown
in the Admin Console.
but I'm not entirely sure what they mean (the default version of the app?).
The page URLs work fine if I visit them directly, but the links will not show in the Admin Console sidebar.
YAML:
application: namegenerator
version: 1
runtime: python27
api_version: 1
threadsafe: true
handlers:
- url: /css
static_dir: css
- url: /admin/.*
script: main.app
login: admin
- url: /.*
script: main.app
libraries:
- name: jinja2
version: latest
builtins:
- remote_api: on
admin_console:
pages:
- name: Manual DB Entry
url: /admin/db/add
- name: Clear DB
url: /admin/db/clear
Python routing:
app = webapp2.WSGIApplication([('/', MainHandler),
('/vote', SubmitVote),
('/clear_session', ClearUserSession),
('/admin/db/clear', ClearDatabase),
('/admin/db/add', ManualAddToDatabase)],
debug=True)
This is all being tested and run on my local machine, by the way. Thanks for any help.
Your code looks fine to me. Did you deploy your application? I think the admin pages will not be shown in your SDK.
By the way: An administrator can change which major deployed version of the application is default using Administration Console: https://appengine.google.com/