我有Django 1.6项目,并使用Nginx Web服务器后面的Gunicorn Web应用程序服务器运行。现在我想将该项目转移到新主机。为此我已经在新机器上复制了所有代码,并使用成功的pip install -r requirements.txt安装了所有必需的依赖项。
当我试图运行python manage.py runserver 0.0.0.0:8000
时,它给了我以下错误:
Unable to process log entry: Unsupported Sentry DSN scheme:
Traceback (most recent call last):
File "/var/www/html/forttottensquare/env/local/lib/python2.7/site-packages/raven/contrib/django/models.py", line 174, in sentry_exception_handler
client.captureException(exc_info=sys.exc_info(), request=request)
File "/var/www/html/forttottensquare/env/local/lib/python2.7/site-packages/raven/contrib/django/models.py", line 54, in <lambda>
_getattr_ = lambda x, o: getattr(get_client(), o)
File "/var/www/html/forttottensquare/env/local/lib/python2.7/site-packages/raven/contrib/django/models.py", line 154, in get_client
instance = Client(**options)
File "/var/www/html/forttottensquare/env/local/lib/python2.7/site-packages/raven/base.py", line 141, in _init_
self.set_dsn(dsn, transport)
File "/var/www/html/forttottensquare/env/local/lib/python2.7/site-packages/raven/base.py", line 195, in set_dsn
transport_registry=self._registry,
File "/var/www/html/forttottensquare/env/local/lib/python2.7/site-packages/raven/conf/remote.py", line 69, in from_string
raise InvalidDsn(ERR_UNKNOWN_SCHEME.format(url.scheme))
InvalidDsn: Unsupported Sentry DSN scheme:
我在settings.py文件中有以下设置:
RAVEN_CONFIG = {
'dsn': os.environ.get('SENTRY_DSN', ''),
}
我曾尝试用
更改它RAVEN_CONFIG = {
'dsn': None
}
或者
RAVEN_CONFIG = {}
之后它在控制台上给出了以下错误:
未配置Raven(禁用日志记录)。有关更多信息,请参阅文档。
在浏览器中,它只给出了服务器错误(500)。
那我该怎么做才能解决这个问题?