0

While I am working at localhost:8080, when I open interactive console and do some operations, like getting list of Kind etc (address: http://localhost:8080/_ah/admin/interactive) then it gives me this error:

<class 'google.appengine.dist._library.UnacceptableVersionError'>: django 1.2 was requested, but 0.96.4.None is already in use

This errors happened several times, in similar cases. It is stuck until restart localhost by dev_appserver.py

Is this a bug or what I am doing wrong?

Example for what I did at interactive console:

from myapp.models import *
for room in Room.all():
    room.update_time = room.create_time
    room.put()

Note:
This is my django_bootstrap :

import os
import sys
import logging
import __builtin__
from google.appengine.ext.webapp import util

import pickle
sys.modules['cPicle'] =pickle

logging.getLogger().setLevel(logging.INFO)

sys.path.insert(0, os.path.abspath((os.path.dirname(__file__))))

import os
os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'

from google.appengine.dist import use_library
use_library('django', '1.2')


import django.core.handlers.wsgi

def main():
    application = django.core.handlers.wsgi.WSGIHandler()
    util.run_wsgi_app(application)    

if __name__ == '__main__':    
    main()
asdf_enel_hak
  • 7,474
  • 5
  • 42
  • 84

1 Answers1

0

my index.ymal in root folder says:

# AUTOGENERATED

# This index.yaml is automatically updated whenever the dev_appserver
# detects that a new type of query is run.  If you want to manage the
# index.yaml file manually, remove the above marker line (the line
# saying "# AUTOGENERATED").  If you want to manage some indexes
# manually, move them above the marker line.  The index.yaml file is
# automatically uploaded to the admin console when you next deploy
# your application using appcfg.py.

Thus each time I open http://localhost:8080/_ah/admin/datastore, this file updated: which is still has the same content but timestamp of file on operating system says it is updated.

I think here, As the http://localhost:8080 sees that models.py is not the same then it could load it then can not start django_bootstrap.

However if I first open http://localhost:8080/_ah/admin/datastore and then http://localhost:8080, it works. So this is why sometimes I get error sometimes not: It depends of order urls respective

asdf_enel_hak
  • 7,474
  • 5
  • 42
  • 84