For about 5 hours now i have been trying to deploy a website on my local network, I am using google app engine and will run it locally. What im trying to do is invoke a terminal script once the user clicks the “Submit” button on my page.
The script will run on my server (), Well, the script runs fine, but Google app engine is giving an error everytime i try to invoke it…
I am using ubuntu 12.04, Python for programming in GAE…. and the error occurs on this line…
subprocess.call(['sendSMS.sh %s %s' % (s1,s2)])
and the error says:
subprocess.call([‘sendSMS.sh %s %s’ % (s1,s2)]) AttributeError:
‘module’ object has no attribute ‘call’
There is no
subprocess.callon Google App Engine. App Engine has no file system (as @bernie explained in the comments) and you cannot run arbitrary code on the Google infrastructure — only Python (and Java and Go) code.It looks like you were never planning to upload your app to run on the Google platform (since then you couldn’t use the phone you have attached to your own server), and that implies you were planning to use the development server in production. This is a very bad idea — the development server is meant for testing your app before uploading it to the Google platform, and should never be used in production.
Since you have your own server, you should be running a production web server such as Apache. If you have used
webapp2(as recommended by the App Engine tutorial), you can still make use of your existing code. Just use Apache’s mod_wsgi and then deploy yourwebapp2app in Apache on your server.