You are not logged in.

#1 2012-12-31 21:46:23

rg_arc
Member
Registered: 2011-03-20
Posts: 507

Google app engine doesn't work using python2

I downloaded the app engine from the site and tried to use it with python2 but it would not work. So I found the app engine package from AUR and installed that. I put the python command into the terminal pointing to the directory I have all of my website files and I get this error:

$ dev_appserver.py /home/ricky/Dropbox/Linux/Programming/HTML/
WARNING  2012-12-31 21:32:53,605 rdbms_mysqldb.py:74] The rdbms API is not available because the MySQLdb library could not be loaded.
INFO     2012-12-31 21:32:54,291 appcfg.py:586] Checking for updates to the SDK.
INFO     2012-12-31 21:32:55,147 appcfg.py:604] The SDK is up to date.
WARNING  2012-12-31 21:32:55,147 dev_appserver.py:3571] The datastore file stub is deprecated, and
will stop being the default in a future release.
Append the --use_sqlite flag to use the new SQLite stub.

You can port your existing data using the --port_sqlite_data flag or
purge your previous test data with --clear_datastore.

WARNING  2012-12-31 21:32:55,149 datastore_file_stub.py:518] Could not read datastore data from /tmp/dev_appserver.datastore
WARNING  2012-12-31 21:32:55,153 simple_search_stub.py:954] Could not read search indexes from /tmp/dev_appserver.searchindexes
WARNING  2012-12-31 21:32:55,196 dev_appserver.py:3670] Could not initialize images API; you are likely missing the Python "PIL" module. ImportError: No module named _imaging
Traceback (most recent call last):
  File "/usr/bin/dev_appserver.py", line 171, in <module>
    run_file(__file__, globals())
  File "/usr/bin/dev_appserver.py", line 167, in run_file
    execfile(script_path, globals_)
  File "/opt/google-appengine-python/google/appengine/tools/dev_appserver_main.py", line 747, in <module>
    sys.exit(main(sys.argv))
  File "/opt/google-appengine-python/google/appengine/tools/dev_appserver_main.py", line 710, in main
    interactive_console=interactive_console)
  File "/opt/google-appengine-python/google/appengine/tools/dev_appserver.py", line 3952, in CreateServer
    server = HTTPServerWithScheduler((serve_address, port), handler_class)
  File "/opt/google-appengine-python/google/appengine/tools/dev_appserver.py", line 3979, in __init__
    request_handler_class)
  File "/usr/lib/python2.7/SocketServer.py", line 408, in __init__
    self.server_bind()
  File "/usr/lib/python2.7/BaseHTTPServer.py", line 108, in server_bind
    SocketServer.TCPServer.server_bind(self)
  File "/usr/lib/python2.7/SocketServer.py", line 419, in server_bind
    self.socket.bind(self.server_address)
  File "/usr/lib/python2.7/socket.py", line 224, in meth
    return getattr(self._sock,name)(*args)
socket.gaierror: [Errno -2] Name or service not known

I have a helloworld.py file in that directory along with the .yaml file:

PYTHON:

import webapp2

class MainPage(webapp2.RequestHandler):
    def get(self):
        self.response.headers['Content-Type'] = 'text/plain'
        self.response.write('Hello, webapp2 World!')
        
app = webapp2.WSGIApplication([('/', MainPage)], debug=True)

YAML:

application: thoughtsofageographer
version: 1
runtime: python27
api_version: 1
threadsafe: yes

handlers:
- url: /.*
  script: helloworld.app

libraries:
- name: webapp2
  version: "2.5.2"

I have python(3) installed and the newest python2 package installed. I am not sure if this is a problem with the google app package itself or python or if one of these files are coded wrong.

Offline

#2 2013-01-04 00:34:14

rg_arc
Member
Registered: 2011-03-20
Posts: 507

Re: Google app engine doesn't work using python2

Has anyone else experienced this problem with the google app engine?

Offline

Board footer

Powered by FluxBB