sebastian-ardila / google-app-engine-django

Automatically exported from code.google.com/p/google-app-engine-django
Apache License 2.0
0 stars 0 forks source link

from google.appengine.dist works in local 2.7 environment #205

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Take a 2.5 Application in last 2.7 environment

2. It has two lines
from google.appengine.dist import use_library
use_library('django', '1.1')

3. Comment second one
from google.appengine.dist import use_library
#use_library('django', '1.1')

What is the expected output? What do you see instead?
from what i understood should not work
local server workscloud version crashes

From what i understood should crash always

What version of the product are you using? On what operating system?

last version

ubuntu 12.04

Please provide any additional information below.

Original issue reported on code.google.com by alu...@alucab.org on 23 Dec 2012 at 12:42

GoogleCodeExporter commented 9 years ago
Yeah, wtf is going on here. It seems that the SDK paths are set up locally but 
not when deployed to app engine. The traceback you get on app engine (not 
locally) is:

Traceback (most recent call last):
  File "/python27_runtime/python27_lib/versions/1/google/appengine/runtime/wsgi.py", line 196, in Handle
    handler = _config_handle.add_wsgi_middleware(self._LoadHandler())
  File "/python27_runtime/python27_lib/versions/1/google/appengine/runtime/wsgi.py", line 266, in _LoadHandler
    __import__(cumulative_path)
  File "/base/data/home/apps/s~chirpradio-hrd/1.364747956586550295/api/handler.py", line 23, in <module>
    import main
  File "/base/data/home/apps/s~chirpradio-hrd/1.364747956586550295/main.py", line 29, in <module>
    InstallAppengineHelperForDjango('1.3')
  File "/base/data/home/apps/s~chirpradio-hrd/1.364747956586550295/appengine_django/__init__.py", line 539, in InstallAppengineHelperForDjango
    LoadDjango(version)
  File "/base/data/home/apps/s~chirpradio-hrd/1.364747956586550295/appengine_django/__init__.py", line 163, in LoadDjango
    from google.appengine.dist import use_library
ImportError: No module named dist

Original comment by kumar.mcmillan on 21 Jan 2013 at 8:07

GoogleCodeExporter commented 9 years ago
There is so much import magic at work here with GAE's insane SDK stub 
implementation that I have no idea what's going on. I got my app to work by not 
using App Engine Helper in production at all. However, I could not get my 
Django test suite to run without it. 

In case it helps anyone, here are all the changes I had to make to migrate my 
app from 2.5 to 2.7. This solves the exception in this issue. Note that I never 
used the App Engine Helper models so I stripped a lot of that out. This may or 
not work for other apps.

https://github.com/chirpradio/chirpradio/compare/00cc13e1306a532e2d2d6bb75c354e3
102d62a0f...62a696469d7c229c8fba28ba6065159968db55ab

Original comment by kumar.mcmillan on 22 Jan 2013 at 8:08

GoogleCodeExporter commented 9 years ago
i am geting the same issue........please give any suggestion asap.

Original comment by muk...@ranosys.com on 22 Dec 2014 at 3:12