이 오류를 완전히 이해하지 못합니다. 내가 django-nonrel을 사용하여 manage.py로 내 응용 프로그램에 업로드합니다. 그리고 가끔 나는이 있습니다Google 애플리케이션 엔진의 django 경로
<type 'exceptions.AttributeError'>: 'Settings' object has no attribute 'DATABASE_ROUTERS'
Traceback (most recent call last):
File "/base/data/home/apps/appid/3.347077242893060339/execute.py", line 2, in <module>
from djapp import queue_controller
File "/base/data/home/apps/appid/3.347077242893060339/djapp/queue_controller.py", line 5, in <module>
from djapp.models import Operation
File "/base/data/home/apps/appid/3.347077242893060339/djapp/models.py", line 3, in <module>
from django.db import models
File "/base/data/home/apps/appid/3.347077242893060339/django/db/__init__.py", line 66, in <module>
router = ConnectionRouter(settings.DATABASE_ROUTERS)
File "/base/python_runtime/python_lib/versions/third_party/django-0.96/django/conf/__init__.py", line 32, in __getattr__
return getattr(self._target, name)
또는 경로에 이상이 무엇
<type 'exceptions.ImportError'>: No module named files.uploadhandler
Traceback (most recent call last):
File "/base/data/home/apps/appid/3.347067228745038183/djangoappengine/main/main.py", line 28, in <module>
from django.core.handlers.wsgi import WSGIHandler
File "/base/python_runtime/python_lib/versions/third_party/django-0.96/django/core/handlers/wsgi.py", line 1, in <module>
from django.core.handlers.base import BaseHandler
File "/base/python_runtime/python_lib/versions/third_party/django-0.96/django/core/handlers/base.py", line 3, in <module>
from django import http
File "/base/data/home/apps/appid/3.347067228745038183/django/http/__init__.py", line 28, in <module>
from django.http.multipartparser import MultiPartParser
File "/base/data/home/apps/appid/3.347067228745038183/django/http/multipartparser.py", line 14, in <module>
from django.core.files.uploadhandler import StopUpload, SkipFile, StopFutureHandlers
? 왜 이런 일이 생길까요? 처음에는 경로가 "/base/data/home/apps/app-id/3.347046818251769742/django/"이고 "/base/python_runtime/python_lib/versions/third_party/django-0.96/django/"입니다.
이 오류를 방지하는 방법은 무엇입니까? 내가 sys.path에 체크 한
는, 내가 잃어버린하고 :(
sys.path = ['/base/data/home/apps/appid/3.347077364008022180',
'/base/data/home/apps/appid/3.347077364008022180/djangoappengine/lib',
'/base/python_runtime/python_dist/lib/python25.zip',
'/base/python_runtime/python_dist/lib/python2.5/',
'/base/python_runtime/python_dist/lib/python2.5/plat-linux2',
'/base/python_runtime/python_dist/lib/python2.5/lib-tk',
'/base/python_runtime/python_dist/lib/python2.5/lib-dynload',
'/base/python_runtime/python_lib/versions/1',
'/base/data/home/apps/appid/3.347077364008022180/']
앱 스토어를 사용하고 있습니까? 이런 종류의 일은 nonrel이 인스턴스에서 사용되기 전에 인스턴스가 기본 Django를로드 할 때 발생하는 것으로 보입니다. – geoffspear
django를로드 한 다음 "appengine console"응용 프로그램을 업로드 한 다음 제거했습니다. 이제 응용 프로그램에는 django-nonrel 및 wave 로봇 API 만 있습니다. 인스턴스가 기본 Django를 어떻게로드합니까? – shmakova