我想用Sentry + Raven檢測獨立Python腳本中的錯誤。
我試圖配置它並raven test ...
正在工作。
後來我把這個在腳本的頂部:Sentry只顯示<unknown>:無錯誤
from raven import Client
client = Client('http://[email protected]/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'
但我在哨兵看到的全部是
這是完全沒用的。
我該如何改變這個以獲得正常的回溯?
是的你是對的,但是有沒有辦法在try-except中捕獲一個不包含代碼塊的異常。我可以在終端看到錯誤,我可以在Sentry中看到它嗎? – Sergey 2014-09-02 10:54:56