for *** :
try:
xx = A(
a=x,
b=y
)
xx.save()
except:
pass
這裏是我的問題:一旦「xx」之一保存錯誤,其他人不會保存成功。 有人知道爲什麼嗎?謝謝!django保存錯誤
這裏是錯誤消息
Exception
[2011-08-22 14:02:23,879: WARNING/PoolWorker-1] RuntimeError
[2011-08-22 14:02:23,879: WARNING/PoolWorker-1] :
[2011-08-22 14:02:23,879: WARNING/PoolWorker-1] 'generator ignored GeneratorExit'
[2011-08-22 14:02:23,879: WARNING/PoolWorker-1] in
[2011-08-22 14:02:23,880: WARNING/PoolWorker-1] <generator object msg_iter_page at 0x2ec28c0>
[2011-08-22 14:02:23,880: WARNING/PoolWorker-1] ignored
...縮進? –
請通過刪除'try:except:'block向我們顯示錯誤消息, – YOU
異常 [2011-08-22 14:02:23,879:WARNING/PoolWorker-1] RuntimeError [2011-08-22 14:02:23,879 :WARNING/PoolWorker-1]: [2011-08-22 14:02:23,879:WARNING/PoolWorker-1]'generator ignored GeneratorExit' [2011-08-22 14:02:23,879:WARNING/PoolWorker-1 ] [2011-08-22 14:02:23,880:WARNING/PoolWorker-1] <生成器對象msg_iter_page在0x2ec28c0> [2011-08-22 14:02:23,880:WARNING/PoolWorker-1]忽略 – Danfi