views:

36

answers:

1

I am working on a django project and have used django nonrel to deploy on google app engine. However when I try to create a super user using the command "manage.py remote create superuser", I get the following error, Please let me know if anyone knows the reason for this

Username: newuser
Traceback (most recent call last):
  File "C:\SVN GAE\development\legaltracker\manage.py", line 26, in <module>
    execute_manager(settings)
  File "C:\SVN GAE\development\legaltracker\django\core\management\__init__.py",
 line 438, in execute_manager
    utility.execute()
  File "C:\SVN GAE\development\legaltracker\django\core\management\__init__.py",
 line 379, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "C:\SVN GAE\development\legaltracker\djangoappengine\management\commands\
remote.py", line 15, in run_from_argv
    execute_from_command_line(argv)
  File "C:\SVN GAE\development\legaltracker\django\core\management\__init__.py",
 line 429, in execute_from_command_line
    utility.execute()
  File "C:\SVN GAE\development\legaltracker\django\core\management\__init__.py",
 line 379, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "C:\SVN GAE\development\legaltracker\django\core\management\base.py", lin
e 191, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "C:\SVN GAE\development\legaltracker\django\core\management\base.py", lin
e 218, in execute
    output = self.handle(*args, **options)
  File "C:\SVN GAE\development\legaltracker\django\contrib\auth\management\comma
nds\createsuperuser.py", line 97, in handle
    User.objects.get(username=username)
  File "C:\SVN GAE\development\legaltracker\django\db\models\manager.py", line 1
32, in get
    return self.get_query_set().get(*args, **kwargs)
  File "C:\SVN GAE\development\legaltracker\django\db\models\query.py", line 336
, in get
    num = len(clone)
  File "C:\SVN GAE\development\legaltracker\django\db\models\query.py", line 81,
 in __len__
    self._result_cache = list(self.iterator())
  File "C:\SVN GAE\development\legaltracker\django\db\models\query.py", line 269
, in iterator
    for row in compiler.results_iter():
  File "C:\SVN GAE\development\legaltracker\djangotoolbox\db\basecompiler.py", l
ine 219, in results_iter
    for entity in self.build_query(fields).fetch(low_mark, high_mark):
  File "C:\SVN GAE\development\legaltracker\djangoappengine\db\compiler.py", lin
e 95, in fetch
    results = query.Run(**kw)
  File "C:\Program Files\Google\google_appengine\google\appengine\api\datastore.
py", line 1138, in Run
    return self._Run(**kwargs)
  File "C:\Program Files\Google\google_appengine\google\appengine\api\datastore.
py", line 1167, in _Run
    datastore_pb.QueryResult(), rpc)
  File "C:\Program Files\Google\google_appengine\google\appengine\api\datastore.
py", line 186, in _MakeSyncCall
    rpc.check_success()
  File "C:\Program Files\Google\google_appengine\google\appengine\api\apiproxy_s
tub_map.py", line 474, in check_success
    self.__rpc.CheckSuccess()
  File "C:\Program Files\Google\google_appengine\google\appengine\api\apiproxy_r
pc.py", line 149, in _WaitImpl
    self.request, self.response)
  File "C:\Program Files\Google\google_appengine\google\appengine\ext\remote_api
\remote_api_stub.py", line 223, in MakeSyncCall
    handler(request, response)
  File "C:\Program Files\Google\google_appengine\google\appengine\ext\remote_api
\remote_api_stub.py", line 232, in _Dynamic_RunQuery
    'datastore_v3', 'RunQuery', query, query_result)
  File "C:\Program Files\Google\google_appengine\google\appengine\ext\remote_api
\remote_api_stub.py", line 155, in MakeSyncCall
    self._MakeRealSyncCall(service, call, request, response)
  File "C:\Program Files\Google\google_appengine\google\appengine\ext\remote_api
\remote_api_stub.py", line 167, in _MakeRealSyncCall
    encoded_response = self._server.Send(self._path, encoded_request)
  File "C:\Program Files\Google\google_appengine\google\appengine\tools\appengin
e_rpc.py", line 346, in Send
    f = self.opener.open(req)
  File "C:\Python25\lib\urllib2.py", line 387, in open
    response = meth(req, response)
  File "C:\Python25\lib\urllib2.py", line 498, in http_response
    'http', request, response, code, msg, hdrs)
  File "C:\Python25\lib\urllib2.py", line 425, in error
    return self._call_chain(*args)
  File "C:\Python25\lib\urllib2.py", line 360, in _call_chain
    result = func(*args)
  File "C:\Python25\lib\urllib2.py", line 506, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 302: Found
A: 

Im not very familiar with django nonrel but HTTP code 302 is not really an error but indicates that the client should try under a different URL. Unfortunately the error message does not show which URL is redirected to. I see this happens on the local development server - I suggest you check the logfile of the development webserver.

mdorseif