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

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.

Related

Making web server with Google app engine

I created the app.yaml and index.py files in a folder.
app.yaml
application: firstpython
version: 1
runtime: python
api_version: 1
handlers:
- url: /.*
script: index.py
index.py
print 'Content-Type: text/plain'
print ''
print 'Hello, World'
When I run the dev_appserver.py folder command, I see the page from my own computer by typing localhost:8080. But computers on the same network another can not reach this page by typing my ip, eg 192.168.1.35:8080.
How can I do that?

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

Blank Page with web.py and Google App Engine

I'm trying to get web.py app running on local Google App Engine.
My yaml:
application: appname
version: 1
runtime: python27
api_version: 1
threadsafe: true
handlers:
- url: /.*
script: code.app
My code.py:
import web
urls = (
"/.*", "hello",
)
app = web.application(urls, globals())
class hello:
def GET(self):
return 'Hello, world!'
app = app.gaerun()
When I start the server all I get is a blank page. So what's wrong?
Edit:
python --version
Python 2.7.6
Edit 2:
Error from console:
ImportError: No module named web
What you're trying to do is import an external module, which is not supported by GAE.
What you can do though, is copy web.py into your app directory, and then use it. See "How to include third party Python libraries in Google App Engine".
You can get the source code from here

Error uploading application Python Google App Engine

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/

Google App Engine Handler not displaying content

Hi I'm trying to get my Google App Engine application running on local host but I'm getting issues when I try to run it.
This is the code I'm tryng to run:
# helloworld.py
import webapp2
class MainHandler(webapp2.RequestHandler):
def get(self):
#"Test" text is not displayed
self.response.write("Test")
app = webapp2.WSGIApplication([('/', MainHandler)],
debug=True)
#This line prints the content
print "This works fine"
When I run the dev server on localhost I get Code 200 as response but the handler doesn't seems to be executed properly.
Any idea?
Your code looks fine, just make sure your in your app.yaml you have the handlers correct. It should look something like this:
application: helloworld
version: 1
runtime: python27
api_version: 1
threadsafe: yes
handlers:
- url: .*
script: helloworld.app
libraries:
- name: webapp2
version: "2.5.2"
If you haven't done it yet, you should also complete the Getting Started tutorial.
I solved this issue. Using webapp2 library I have to add the folowing code to the *.yaml file:
libraries:
- name: webapp2
version: "2.5.2"

Categories

Resources