{"id":707,"date":"2010-03-12T08:05:15","date_gmt":"2010-03-12T12:05:15","guid":{"rendered":"http:\/\/www.dr-chuck.com\/wordpress\/?p=707"},"modified":"2011-12-17T12:32:35","modified_gmt":"2011-12-17T16:32:35","slug":"app-engine-fix-for-importerror-cannot-import-name-os_compat","status":"publish","type":"post","link":"https:\/\/www.dr-chuck.com\/csev-blog\/2010\/03\/app-engine-fix-for-importerror-cannot-import-name-os_compat\/","title":{"rendered":"App Engine Fix For &#8211; ImportError: cannot import name os_compat"},"content":{"rendered":"<p>One of the more mysterious errors one gets with App Engine is when the application fails to start up with the following error:<\/p>\n<pre>\n*** Running dev_appserver with the following flags:\n--admin_console_server= --port=8080\nPython command: \/usr\/bin\/python2.6\nTraceback (most recent call last):\nFile \"\/Applications\/GoogleAppEngineLauncher.app\/Contents\/Resources\/\nGoogleAppEngine-default.bundle\/Contents\/Resources\/google_appengine\/\ndev_appserver.py\", line 68, in <module>\nrun_file(__file__, globals())\nFile \"\/Applications\/GoogleAppEngineLauncher.app\/Contents\/Resources\/\nGoogleAppEngine-default.bundle\/Contents\/Resources\/google_appengine\n\/dev_appserver.py\", line 64, in run_file\nexecfile(script_path, globals_)\nFile \"\/Applications\/GoogleAppEngineLauncher.app\/Contents\/Resources\/\nGoogleAppEngine-default.bundle\/Contents\/Resources\/google_appengine\/google\/\nappengine\/tools\/dev_appserver_main.py\", line 66, in <module>\nfrom google.appengine.tools import os_compat\nImportError: cannot import name os_compat\n<\/pre>\n<p>\n<a href=\"http:\/\/dr-chuck.com\/images\/2010\/03\/index.php?img=01-app-failed.png\" target=\"_new\"> <img decoding=\"async\" src=\"http:\/\/dr-chuck.com\/images\/2010\/03\/01-app-failed.png\" alt=\"01-app-failed.png\" width=\"360\" align=\"right\"><\/a><br \/>\nIf you look through the forums there is a lot of talk about Python 2.5 or Python 2.6 and suggestions to go back to Python 2.5 &#8211; that seems not to be the problem at all because it fails in 2.5 as well with the same error.<\/p>\n<p>\nI have carefully reproduced the problem and it is when a non-administrator person tries to run the App Engine Launcher.  The fix is to simply make the person an administrative user.  And here is the strange thing &#8211; once you make the use an &#8220;Allow to administer this computer&#8221; user and start App Engine once as an the user with admin powers and then log out and take a way admin powers and then log back in &#8211; then it works!  Crazy.<\/p>\n<p>\nThis problem is generally reported on Mac OS 10.6 versions.<\/p>\n<p>\nNow after an hour of debugging and researching, I can get back to recording those &#8220;introductory &#8211; see how easy this to install&#8221; videos :)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>One of the more mysterious errors one gets with App Engine is when the application fails to start up with the following error: *** Running dev_appserver with the following flags: &#8211;admin_console_server= &#8211;port=8080 Python command: \/usr\/bin\/python2.6 Traceback (most recent call last): File &#8220;\/Applications\/GoogleAppEngineLauncher.app\/Contents\/Resources\/ GoogleAppEngine-default.bundle\/Contents\/Resources\/google_appengine\/ dev_appserver.py&#8221;, line 68, in run_file(__file__, globals()) File &#8220;\/Applications\/GoogleAppEngineLauncher.app\/Contents\/Resources\/ GoogleAppEngine-default.bundle\/Contents\/Resources\/google_appengine \/dev_appserver.py&#8221;, line 64, [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-707","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/posts\/707","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/comments?post=707"}],"version-history":[{"count":1,"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/posts\/707\/revisions"}],"predecessor-version":[{"id":2816,"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/posts\/707\/revisions\/2816"}],"wp:attachment":[{"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/media?parent=707"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/categories?post=707"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/tags?post=707"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}