Open ronaldocpontes opened 10 years ago
Do you have the app engine SDK installed in the correct place?
It is installed and I used it to create the symlinks. The project actually works when I use the SDK GUI to start/deploy the app but I can't start or use any of the manage.py commands via the cmd line
App engine SDK is acessible from /usr/local/google_appengine...
ls -1 /usr/local/google_appengine
BUGS
LICENSE
README
RELEASE_NOTES
VERSION
_php_runtime.py
_python_runtime.py
api_server.py
appcfg.py
backends_conversion.py
bulkload_client.py
bulkloader.py
demos
dev_appserver.py
dev_appserver.pyc
download_appstats.py
endpointscfg.py
gen_protorpc.py
google
google_appengine
google_sql.py
lib
new_project_template
old_dev_appserver.py
php
php_cli.py
remote_api_shell.py
run_tests.py
tools
wrapper_util.py
wrapper_util.pyc
on djangoappengine/utils.py there is an import for dev_appserver
else:
try:
from google.appengine.tools import dev_appserver
However, this module doesnt exist on my version of the SDK...
ls /usr/local/google_appengine/google/appengine/tools/dev_*
/usr/local/google_appengine/google/appengine/tools/dev_appserver_apiserver.py
/usr/local/google_appengine/google/appengine/tools/dev_appserver_blobimage.py
/usr/local/google_appengine/google/appengine/tools/dev_appserver_blobstore.py
/usr/local/google_appengine/google/appengine/tools/dev_appserver_channel.py
/usr/local/google_appengine/google/appengine/tools/dev_appserver_import_hook.py
/usr/local/google_appengine/google/appengine/tools/dev_appserver_index.py
/usr/local/google_appengine/google/appengine/tools/dev_appserver_login.py
/usr/local/google_appengine/google/appengine/tools/dev_appserver_login.pyc
/usr/local/google_appengine/google/appengine/tools/dev_appserver_main.py
/usr/local/google_appengine/google/appengine/tools/dev_appserver_multiprocess.py
/usr/local/google_appengine/google/appengine/tools/dev_appserver_oauth.py
/usr/local/google_appengine/google/appengine/tools/dev_appserver_upload.py
how should I proceed?
the import should look like this:
try:
from google.appengine.tools import dev_appserver
except ImportError:
from google.appengine.tools import old_dev_appserver as dev_appserver
So if dev_appserver
doesn't exist (it went away in SDK 1.9 I think) then it should load old_dev_appserver
which does exist, at least in my SDK.
Which SDK version are you using? And which version of djangoappengine?
@aburgel can reproduce with app engine 1.9.7 + latest master of djangoappengine. https://github.com/potatolondon/djappengine/blob/master/lib/environ.py#L32
12:01 $ cat /usr/local/google_appengine/VERSION
release: "1.9.7"
timestamp: 1401836503
api_versions: ['1']
supported_api_versions:
python:
api_versions: ['1']
python27:
api_versions: ['1']
go:
api_versions: ['go1']
java7:
api_versions: ['1.0']
:+1: the solution works
The new version of app engine (1.9.17) has done away with old_dev_appserver
(see SdkReleaseNotes)
and this results in the exception:
File "/Users/username/git/project/build/djangoappengine/utils.py", line 24, in <module>
...
Exception: Could not get appid. Is your app.yaml file missing? Error was: cannot import name old_dev_appserver
I am now unable to run the development server. Symlinks are created. Any idea how I should proceed? Can we downgrade the app engine version? Will this affect deployment?
@npgauth take a look at the devappserver2 branch in #77. It fixes this issue. I will merge it in to master soon.
When we say 'soon' ... how much longer are we looking at here? I'm still dead in the water on the 1.9.17 appengine.
@slumtrimpet there are still some issues with the branch, but you can use it if you want. it should work pretty well.
I have the same issue on it and tried on branch devappserver2. Another issue raise.
INFO 2014-12-27 13:11:38,700 sdk_update_checker.py:229] Checking for updates to the SDK. TypeError: do_open() got an unexpected keyword argument 'context'
@huayueh i've been experienced the same problem with 1.9.15. looks like the solution is https://code.google.com/p/googleappengine/issues/detail?id=11536
I just noticed on devappserver2, it seems this last update that the local shell does not use the datastore_path option, because my database is empty when using local shell. I have to dig further, but wondering if anyone else also see this?
+1 for https://github.com/django-nonrel/djangoappengine/pull/77 - I was getting this error from manage.py:
Exception: Could not get appid. Is your app.yaml file missing?
Error was: cannot import name old_dev_appserver
Using the devappserver2 branch fixed it for me, and manage.py works now.
I am having this problem on a MAC Mountain Lion...
./manage.py runserver