Error uploading application Python Google App Engine - python

I have been trying to upload python Google app engine folder using windows command prompt. I have the app.yaml as well as a python file in the folder. But when I pass the following command in the Command Prompt:
appcfg.py --oauth2 update C:/Path/to/the/folder
I get this error.
appcfg.py: error: Directory does not contain an Project.yaml configuration file.
Where am I wrong and how should I proceed?
This is my app.yaml file:
application: myappid
version: 1
runtime: python27
api_version: 1
threadsafe: true
handlers:
- url: /.*
script: sampleapp.app
libraries:
- name: lxml
version: "latest"

Check your shell syntax. I had this error message also, by not referencing the right project folder. Note the ending slash:
appcfg.py --oauth2 update C:/Path/to/the/folder/

Related

Google app engine launcher while browsing project "No such projects are selected"

I have created folder that is apps, and that having the subfolder that is ae-01-trivial.Added app.yaml to the ae-01-trivial,
Following code are added to the app.yaml:
application: ae-01-trivial
version: 1
runtime: python34
api_version: 1
handlers: -
url: /.*
script: index.py
And also added index.py to the ae-01-trivial, it is having following code:
print 'Content-Type: text/plain'
print ' '
print 'Hello there Chuck' .
So here I have facing the problem is "no such projects are selected".
If you're trying to create a request handler in App Engine, follow this example. Also Google App Engine uses Python 2.7 runtime for Python applications, so 3.4 may not work.

Hello, World! Google app engine issues

I am on a mac and am attempting to use google app engine for the first time. I have the correct version of python. I created a new application and named it 'helloworld' and left all the files that are automatically generated when you create a new application unchanged. After pressing run, I was able to view the output 'Hello, world!' on my browser at localhost:8081; however, when I deploy the application there is the following error in the log:
*** Running appcfg.py with the following flags:
--no_cookies --email=killianjackson99#gmail.com --passin update
02:28 PM Application: heythereworld; version: 1
02:28 PM Host: appengine.google.com
02:28 PM
Starting update of app: heythereworld, version: 1
02:28 PM Getting current resource limits.
02:28 PM Scanning files on local disk.
Error 404: --- begin server output ---
This application does not exist (app_id=u'heythereworld').
--- end server output ---
Password for killianjackson99#gmail.com: If deploy fails you might need to 'rollback' manually.
The "Make Symlinks..." menu option can help with command-line work.
*** appcfg.py has finished with exit code 1 ***
Does anyone have any thoughts as to what might be going wrong?
Before deploy your application on the Google app engine server you need to create a project in the Google Developers Console. https://console.developers.google.com/project
All you need to know about de deployment is hier: https://developers.google.com/appengine/docs/python/gettingstartedpython27/uploading
Create your project in the Developer Console.
Add the name you entered in the Console in app.yaml:
application: my_app_name
version: 1
runtime: python27
api_version: 1
threadsafe: true
handlers:
- url: /.*
script: helloworld.application

How to solve an error on GAE for "Unexpected attribute 'dispatch' for object of type AppInfoExternal."

Please tell me to deploy my project for GAE.
I can not deploy my project because of the following error.
%appcfg.py update app.yaml dispatch.yaml worker.yaml
(omissions)
appcfg.py: error: Error parsing ./dispatch.yaml: Unexpected attribute 'dispatch' for object of type AppInfoExternal.
in "./dispatch.yaml", line 4, column 1.
This project has the following yaml files in direct project folder.
app.yaml
dipatch.yaml
worker.yaml
The following is dispatch.yaml.
application: my-app
dispatch:
- url: "*/worker/*"
module: worker
The following is worker.yaml.
application: my-app
module: worker
api_version: 1
threadsafe: false
version: uno
runtime: python27
instance_class: B1
manual_scaling:
instances: 1
handlers:
- url: /_ah/start
script: my-worker.app
Also, make sure you run appcfg.py update_dispatch, which is a separate command from update
Wrong indenting. Should be:
application: my-app
dispatch:
- url: "*/worker/*"
module: worker
First of all, dispatch.yaml doesn't seem to be allowed to be an argument of appcfg.py update. The error message must indicate that.
Try:
appcfg.py update app.yaml worker.yaml
Also, dispatch.yaml are not an application config, but the dispatch file. So you may not allowed to write attributes other than dispatch.
modules included in dispatch must come before the dispatch.yaml in appcfg.py update, so correct command is:
appcfg.py update app.yaml worker.yaml dispatch.yaml
I got a similar problem in latest gcp deployment, i.e, using gcloud command.
I got rid of application from dispatch.yaml and this error was gone.
I just ran into an identical error message and eventually what I discovered is that Google requires the dispatch file to be called dispatch.yaml.
My file was something like web.dispatch.yaml, which Google does not like. Renaming my file to dispatch.yaml did the trick.

Can't Use Pycrypto in Google App Engine Production

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.

MissingURLMapping: No URLMap entries found in application configuration

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".

Categories

Resources