0

これの解き方教えてください

CentOS に Sentry サービスをインストールして構成しようとしましたが、Sentry サービスを開始しようとすると、次のエラーが表示されます。

[root@felipeurrego ~]# source /var/www/sentry/bin/activate
(sentry)[root@felipeurrego ~]# sentry --config=/etc/sentry.conf.py start
Traceback (most recent call last):
  File "/var/www/sentry/bin/sentry", line 8, in <module>
    load_entry_point('sentry==5.4.5', 'console_scripts', 'sentry')()
  File "/var/www/sentry/lib/python2.6/site-packages/sentry-5.4.5-py2.6.egg/sentry/utils/runner.py", line 197, in main
    initializer=initialize_app,
  File "/var/www/sentry/lib/python2.6/site-packages/logan-0.5.5-py2.6.egg/logan/runner.py", line 155, in run_app
    management.execute_from_command_line([runner_name, command] + command_args)
  File "/var/www/sentry/lib/python2.6/site-packages/Django-1.4.5-py2.6.egg/django/core/management/__init__.py", line 443, in execute_from_command_line
    utility.execute()
  File "/var/www/sentry/lib/python2.6/site-packages/Django-1.4.5-py2.6.egg/django/core/management/__init__.py", line 382, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/var/www/sentry/lib/python2.6/site-packages/Django-1.4.5-py2.6.egg/django/core/management/__init__.py", line 252, in fetch_command
    app_name = get_commands()[subcommand]
  File "/var/www/sentry/lib/python2.6/site-packages/Django-1.4.5-py2.6.egg/django/core/management/__init__.py", line 101, in get_commands
    apps = settings.INSTALLED_APPS
  File "/var/www/sentry/lib/python2.6/site-packages/Django-1.4.5-py2.6.egg/django/utils/functional.py", line 184, in inner
    self._setup()
  File "/var/www/sentry/lib/python2.6/site-packages/Django-1.4.5-py2.6.egg/django/conf/__init__.py", line 42, in _setup
    self._wrapped = Settings(settings_module)
  File "/var/www/sentry/lib/python2.6/site-packages/Django-1.4.5-py2.6.egg/django/conf/__init__.py", line 93, in __init__
    mod = importlib.import_module(self.SETTINGS_MODULE)
  File "/var/www/sentry/lib/python2.6/site-packages/Django-1.4.5-py2.6.egg/django/utils/importlib.py", line 35, in import_module
    __import__(name)
  File "/var/www/sentry/lib/python2.6/site-packages/logan-0.5.5-py2.6.egg/logan/importer.py", line 68, in load_module
    return self._load_module(fullname)
  File "/var/www/sentry/lib/python2.6/site-packages/logan-0.5.5-py2.6.egg/logan/importer.py", line 92, in _load_module
    load_settings(self.config_path, allow_extras=self.allow_extras, settings=settings_mod)
  File "/var/www/sentry/lib/python2.6/site-packages/logan-0.5.5-py2.6.egg/logan/settings.py", line 49, in load_settings
    execfile(mod_or_filename, conf.__dict__)
    django.core.exceptions.ImproperlyConfigured: IndentationError('unexpected indent', ('/etc/sentry.conf.py', 58, 1, " SENTRY_URL_PREFIX = 'http://logs.felipeurrego.com'\n"))

以上です

4

1 に答える 1

0

それは非常に明確です:

django.core.exceptions.ImproperlyConfigured: IndentationError('予期しないインデント', ('/etc/sentry.conf.py', 58, 1, " SENTRY_URL_PREFIX = ' http://logs.felipeurrego.com '\n"))

の構成変数の前に不当なスペースがありSENTRY_URL_PREFIXます/etc/sentry.conf.py。Python では、ソース コード ファイル内ですべてが均一にインデントされている必要があります。

于 2013-04-12T06:04:50.900 に答える