AI2 and Hexy getting Google app engine Launcher to run a tinywebdb locally on ubuntu 12.04

Ok.. Going on my last weekday of vacation…;( I woke up way too early this morning, freezing.. The furnace had cut out during the night… ( 3 blinky lights on the XR-90 furnace)… It turns out that it was just a ice clogged input pipe.

Anyway, I’m not as bright eyed and bushy tailed as I would like but lets see how this works setting up the tinywebdb.. The instructions seem pretty clear. http://beta.appinventor.mit.edu/learn/reference/other/tinywebdb.html

  • Download App Engine for Python

Need at least 2.7 python.

jonasthomas@jonasthomas-Satellite-P305D:~$ python -V
Python 2.7.3

Ok.. need at least pip 1.4. pip is a package manager. http://en.wikipedia.org/wiki/Pip_%28package_manager%29
http://www.pip-installer.org/en/latest/installing.html

Next is the python-sdk

Instructions say I need to add /home/jonasthomas/google_appengine to my path..
Add this to .bashrc
export PATH=$PATH:/home/jonasthomas/google_appengine
then from terminal did source .bashrc

Ok.. Now here’s where I need to bounce back and forth….
I need to download and unzip http://beta.appinventor.mit.edu/learn/reference/other/tinywebdbassets/customtinywebdb.zip

Now this is where things start getting confusing for me…

In the instructions for installing TinyWebDb they say….

After installing it, run the GoogleAppEngineLauncher by clicking its icon

Well after a little bit of head scratching and googling that only applies to Pc and Mac..

But… It appears you can get a launcher according to this http://forums.udacity.com/questions/6001946/linux-users-google-app-engine-launcher-instructions

http://forums.udacity.com/questions/6004229/google-app-engine-launcher

Ok.. I used to have wx installed in my heekscad days but.. I suspect no longer so…

sudo apt-get install python-wxversion python-wxglade
(Yep I needed that.)
svn checkout http://google-appengine-wx-launcher.googlecode.com/svn/trunk/ google-appengine-launcher
cd google-appengine-launcher

Ok.. I got some error messages which are explained here: http://forums.udacity.com/questions/6001946/linux-users-google-app-engine-launcher-instructions
So this is what I added and seems to be working.
preferencesForGoogleAppEngLauncher

Sooo… lets see back to here
Supposedly all I need to do is this:

  • In the GoogleAppEngineLauncher, choose File | Add Existing Application . Browse to set the Path to the customtinywebdb folder you just unzipped. Then click the Run button. This will launch a test web service that runs on your local machine.

  • You can test the service by opening a browser and entering “localhost:8080” as the URL. You’ll see the web page interface to your web service. The end-goal of this service is to communicate with a mobile app created with App Inventor. But the service provides a web page interface to the service to help programmers with debugging. You can invoke the get and store operations by hand, view the existing entries, and also delete individual entries

Well… when I do that I got this: Firefox can’t establish a connection to the server at localhost:8080.
Hmmm.
I found a rough instructions here. http://forums.udacity.com/questions/100063533/firefox-cant-establish-a-connection-to-the-server-at-00008080

But I don’t think that’s it… In this post, they talk about a little green button on the Google app engine Launcher…
No green but an exclamation point…
When I check the log I got this.

2014-01-03 12:10:21 PM Running command: “[‘/usr/bin/python’, ‘/home/jonasthomas/google_appengine/dev_appserver.py’, ‘–admin_console_server=’, ‘–port=8080′, u’/home/jonasthomas/hexy_stuff/customtinywebdb’]”
usage: dev_appserver.py [-h] [–host HOST] [–port PORT]
[–admin_host ADMIN_HOST] [–admin_port ADMIN_PORT]
[–auth_domain AUTH_DOMAIN] [–storage_path PATH]
[–log_level {debug,info,warning,critical,error}]
[–max_module_instances MAX_MODULE_INSTANCES]
[–use_mtime_file_watcher [USE_MTIME_FILE_WATCHER]]
[–threadsafe_override THREADSAFE_OVERRIDE]
[–php_executable_path PATH]
[–php_remote_debugging [PHP_REMOTE_DEBUGGING]]
[–python_startup_script PYTHON_STARTUP_SCRIPT]
[–python_startup_args PYTHON_STARTUP_ARGS]
[–blobstore_path BLOBSTORE_PATH]
[–mysql_host MYSQL_HOST] [–mysql_port MYSQL_PORT]
[–mysql_user MYSQL_USER]
[–mysql_password MYSQL_PASSWORD]
[–mysql_socket MYSQL_SOCKET]
[–datastore_path DATASTORE_PATH]
[–clear_datastore [CLEAR_DATASTORE]]
[–datastore_consistency_policy {consistent,random,time}]
[–require_indexes [REQUIRE_INDEXES]]
[–auto_id_policy {sequential,scattered}]
[–logs_path LOGS_PATH]
[–show_mail_body [SHOW_MAIL_BODY]]
[–enable_sendmail [ENABLE_SENDMAIL]]
[–smtp_host SMTP_HOST] [–smtp_port SMTP_PORT]
[–smtp_user SMTP_USER]
[–smtp_password SMTP_PASSWORD]
[–prospective_search_path PROSPECTIVE_SEARCH_PATH]
[–clear_prospective_search [CLEAR_PROSPECTIVE_SEARCH]]
[–search_indexes_path SEARCH_INDEXES_PATH]
[–clear_search_indexes [CLEAR_SEARCH_INDEXES]]
[–enable_task_running [ENABLE_TASK_RUNNING]]
[–allow_skipped_files [ALLOW_SKIPPED_FILES]]
[–api_port API_PORT]
[–automatic_restart [AUTOMATIC_RESTART]]
[–dev_appserver_log_level {debug,info,warning,critical,error}]
[–skip_sdk_update_check [SKIP_SDK_UPDATE_CHECK]]
[–default_gcs_bucket_name DEFAULT_GCS_BUCKET_NAME]
yaml_files [yaml_files …]
dev_appserver.py: error: unrecognized arguments: –admin_console_server=
2014-01-03 12:10:22 PM (Process exited with code 2)

ohhh… Google is not my friend here, which usually means I did something dumb…. need to retrace some steps here(which is why I like to document this stuff)..
Soo.. At this point I don’t know if the problem is with Google App Engine Launcher, or the tinywebdb.
Soo. I think there was hello world application here:

So… I’m getting the same error message which suggests the issue isn’t necessary with the tinywebdb application…. Soo something is going on with dev_appserver.py

jonasthomas@jonasthomas-Satellite-P305D:~$ locate dev_appserver.py
/home/jonasthomas/google_appengine/dev_appserver.py
/home/jonasthomas/google_appengine/old_dev_appserver.py
/home/jonasthomas/google_appengine/google/appengine/tools/dev_appserver.py
jonasthomas@jonasthomas-Satellite-P305D:~$

Wrong tree.. I think I found the solution: http://stackoverflow.com/questions/18414207/error-running-google-app-engine-unrecognized-arguments-admin-console-server

Supposedly delete this line will cure the problem….
LinetoDelete

and…..hrrrrggg. green light is on but when I go to http://localhost:8080/ and still no joy….

Hmm. https://support.mozilla.org/en-US/questions/771916
Nope…
Ok… Making progress here…

So basically cd to google_appengine, and ran this and I got it
python dev_appserver.py –port=8080 –host=127.0.0.1 /home/jonasthomas/hexy_stuff/customtinywebdb
and answered “Y” to updates…
Ok.. Lets see what happens if I reboot and try the google-appengine-launcher…
success

Yeh…Ok… I’m calling this success.
Hopefully someone gets something useful out of my pain…
Geeez.. That felt more painful than it needed to be.

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *