MrLoick / app-engine-patch

Automatically exported from code.google.com/p/app-engine-patch
0 stars 0 forks source link

1.1beta doesn't works on Ubuntu 9.04 #174

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
To reproduce
1. Unpack aep sample archive.
2. Put gae SDK into common/.google_appengine
3. python2.5 manage.py runserver
4. Try to open localhost:8000

Expected to see: the page from sample.

Actual result:
<type 'exceptions.ImportError'>
...
 /home/slavikt/work/p/app-engine-patch-sample/common/.google_appengine/google/appengine/tools/dev_appserver.py in LoadModuleRestricted(self=<google.appengine.tools.dev_appserver.HardenedModulesHook object at 0xa29190c>, submodule_fullname='appenginepatcher.patch', source_file=<closed file '/home/slavikt/work/p/app-engine-pa...ppenginepatcher/patch.py', mode 'U' at 0xa2939f8>, pathname='/home/slavikt/work/p/app-engine-patch-sample/common/appenginepatch/appenginepatcher/patch.py', description=('.py', 'U', 1))
 1633                                      source_file,
 1634                                      pathname,
 1635                                      description)
 1636       except:
 1637         if submodule_fullname in self._module_dict:
description = ('.py', 'U', 1)
 /home/slavikt/work/p/app-engine-patch-sample/common/appenginepatch/appenginepatcher/patch.py in ()
    5 # http://code.google.com/p/googleappengine/issues/list
    6 
    7 from google.appengine.ext import db
    8 from google.appengine.ext.db import polymodel
    9 import logging, new, os, re, sys
google undefined, db undefined

<type 'exceptions.ImportError'>: No module named ext
      args = ('No module named ext',)
      message = 'No module named ext' 

The problem is on the fresh Ubuntu 9.04 install. At the sime time on winxp
everything works great.

Any ideas?

Original issue reported on code.google.com by slava.tutushkin on 26 Jun 2009 at 11:48

GoogleCodeExporter commented 8 years ago
Have just checked: the same problem exists with 1.0.2.1

Original comment by slava.tutushkin on 26 Jun 2009 at 11:52

GoogleCodeExporter commented 8 years ago
Ubuntu 9.04 is using python2.6 which is not supported by GAE sdk.
So find your dev_appserver.py and change 1st line to '#/bin/python25'.
Doing this should make it work.

Original comment by LinCong....@gmail.com on 27 Jun 2009 at 12:26

GoogleCodeExporter commented 8 years ago
LinCong, please read carefully.
I'm starting the server with python2.5

More ideas?

Original comment by slava.tutushkin on 27 Jun 2009 at 12:48

GoogleCodeExporter commented 8 years ago
I am also using Ubuntu 9.04 (and previously 8.10) and have had no problems with
either of them. I don't think your problem is to do with Ubuntu.

Original comment by jricket...@gmail.com on 28 Jun 2009 at 11:17

GoogleCodeExporter commented 8 years ago
What are the contents of your .google_appengine folder? Does it contain a 
"google" 
folder?

Original comment by wkornew...@gmail.com on 28 Jun 2009 at 12:33

GoogleCodeExporter commented 8 years ago
Sure.
.google_appengine contains the full appengine SDK.
I have tried the clean install: just unpacked untouched patch-sample, and added 
SDK
into the common directory under .google_appengine. It does not works.

Actually, even placing the SDK into /usr/local/google_appengine changes nothing 
-
still same errors.

Original comment by slava.tutushkin on 28 Jun 2009 at 9:04

GoogleCodeExporter commented 8 years ago
Did you make sure that there's no conflict between your python installs? Maybe 
you need 
to make a clean reinstall of py2.5? Your traceback is very strange in that it 
can't 
import the SDK, but at that point you're already running the SDK.

Could you please try to run dev_appserver.py directly?

Original comment by wkornew...@gmail.com on 3 Jul 2009 at 9:31

GoogleCodeExporter commented 8 years ago
Also, do you possibly have some package named "google" in your PYTHONPATH that 
could 
conflict with the SDK?

Original comment by wkornew...@gmail.com on 8 Jul 2009 at 8:01

GoogleCodeExporter commented 8 years ago
Please test again with the latest repo version. I think this could be a 
duplicate of 
issue 177.

Original comment by wkornew...@gmail.com on 8 Jul 2009 at 1:55

GoogleCodeExporter commented 8 years ago
Closing due to inactivity.

Original comment by wkornew...@gmail.com on 26 Jul 2009 at 11:14

GoogleCodeExporter commented 8 years ago
This error is still unresolved. The repo version doesn't fix it. Running 
dev_appserver.py directly only results in the error "EnvironmentError: 
Environment 
variable DJANGO_SETTINGS_MODULE is undefined."

Original comment by chrisspen@gmail.com on 20 Apr 2010 at 3:34

GoogleCodeExporter commented 8 years ago
Even after I uninstalled the Google protocol buffers, I still get this error, 
so it's 
unlikely to be a duplicate of 177.

Original comment by chrisspen@gmail.com on 20 Apr 2010 at 4:21

GoogleCodeExporter commented 8 years ago
I ran into this issue on Ubuntu with Google App Engine helper but searching for 
the exception led me to this error.  In my case, when I looked closer, I saw 
this warning right before the import error:

WARNING:root:Blocking access to skipped file 
"/my/working/dir/.google_appengine/google/appengine/ext"

Until I saw that warning I was confused because this worked fine up to 
importing ext:

import google
import google.appengine
import google.appengine.ext <- problem

It turns out the culprit is in 
google.appengine.tools.dev_appserver:FakeFile._IsFileAccessibleNoCache.
It makes a regex pattern like this (somehow):

p = re.compile('^(.*/)?((#.*#)|(.*~)|(.*\.py[co])|(.*/RCS/.*)|(\..*)|)$')

and when the ext submodule gets imported it triggers a match:

>>> p.match('/my/working/dir/.google_appengine/google/appengine/ext')
<_sre.SRE_Match object at 0x10031d7c8>

so this blocks access to the ext submodule in dev_appserver.py on line 1171

I don't know the best fix for this but after I moved the directory 
.google_appengine to google_appengine then the error went away.  I.E. I removed 
the dot prefix.

Original comment by kumar.mcmillan on 14 Nov 2010 at 6:18