我想用 Sentry+Raven 检测独立 Python 脚本中的错误。
我试图配置它并且raven test ...
正在工作。
然后我把它放在脚本的顶部:
from raven import Client
client = Client('http://...@.../1')
client.captureException()
稍后会在此生成异常:
import django
django.setup()
from django.conf import settings
我想看看这个错误的实际堆栈:
ImportError: Could not import settings 'settings' (Is it on sys.path? Is there an import error in the settings file?): No module named 'settings'
但我在 Sentry 中看到的只是
这是完全没用的。
我怎样才能改变它以获得正常的回溯?