Reputation: 998
I'm having issues with GAE tutorials. To start even most basic on working, I had to reinstall pyyaml.
Now I am getting:
INFO 2014-12-26 15:06:11,200 module.py:718] default: "POST /_ah/spi/BackendService.getApiConfigs HTTP/1.1" 500 -
INFO 2014-12-26 15:06:11,203 module.py:718] default: "GET /_ah/api/discovery/v1/apis HTTP/1.1" 500 60
ERROR 2014-12-26 20:06:11,236 wsgi.py:263]
Traceback (most recent call last):
File "C:\Program Files\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine\google\appengine\runtime\wsgi.py",
line 240, in Handle
handler = _config_handle.add_wsgi_middleware(self._LoadHandler())
File "C:\Program Files\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine\google\appengine\runtime\wsgi.py",
line 299, in _LoadHandler
handler, path, err = LoadObject(self._handler)
File "C:\Program Files\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine\google\appengine\runtime\wsgi.py",
line 85, in LoadObject
obj = __import__(path[0])
ImportError: No module named helloworld_api
I followed tutorial to the dot, multiple times. Same error every time. Current itiration of me trying to solve this, looks like this:
app.yaml
application: *my id here*
version: 1
runtime: python27
threadsafe: true
api_version: 1
handlers:
# Endpoints handler
- url: /_ah/spi/.*
script: helloworld_api.APPLICATION
libraries:
- name: pycrypto
version: latest
- name: webapp2
version: "2.5.2"
- name: endpoints
version: 1.0
.py is fairly long, but its a copy paste from Step 7 here
Doesn't matter how I launch it, command line or App Engine Launcher, same error occurs. It seems bizarre since it clearly launches from the Launcher fine, it recognizes it. No error on start of the server. When I tried basic tutorial, it worked also fine, something with endpoints is just not clicking for me.
I get a blank screen at API explorer.
File structure is:
-project
-django
-helloworld
app.yaml
helloworld_api.py
helloworld.py
I call the command from django directory with dev_appserver.py helloworld
from Google Cloud SDK Shell
Upvotes: 2
Views: 405
Reputation: 1
I also had the same issue, but I was able to resolve it. I think you need to make sure that the file name of the .py file is the same in app.yaml.
In my case, I had created the app in main.py. So make sure in app.yaml it is listed as main.application. It needs to be "main" and not helloworld_api.APPLICATION. Also make sure the case for "application" matches.
Upvotes: 0
Reputation: 212
I just copied the contents of app.yaml and helloworld_api.py from that tutorial page and it works perfectly. I would suggest you check that the contents of the files match the tutorial page.
Also, I see you have a helloworld.py file in your directory. I don't see this file in the tutorial. What does it contain?
Upvotes: 1
Reputation: 181
If you could add the contents of helloworld_api.py
to your question, I could look through it and see if that's the issue, because sometimes, with Python, you have to be exact about the structure of the document, or it won't be recognized as a document. I've had issues with this before.
Upvotes: 1