所以這讓我困惑了太久。我把它扔給你們。TypeError:異常必須是舊式類或派生自BaseException,而不是無類型
我越來越
TypeError: exceptions must be old-style classes or derived from BaseException, not NoneType
即使我只是使用raise
單獨或與Exception()
這裏是整個回溯櫃面它幫助。我flummoxed ...
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
/home/gus/py274/lib/python2.7/site-packages/IPython/utils/py3compat.pyc in execfile(fname, *where)
176 else:
177 filename = fname
--> 178 __builtin__.execfile(filename, *where)
/home/gus/Dropbox/repos/git/blacktie/src/blacktie/scripts/blacktie_pipeline.py in <module>()
233
234 if __name__ == "__main__":
--> 235 main()
/home/gus/Dropbox/repos/git/blacktie/src/blacktie/scripts/blacktie_pipeline.py in main()
203 # Prep cuffmerge call
204 ##ipdb.set_trace()
--> 205 cuffmerge_call = CuffmergeCall(yargs,email_info,run_id,run_logs,conditions=experiment,mode=args.mode)
206 cuffmerge_call.execute()
207
/home/gus/Dropbox/repos/git/blacktie/src/blacktie/utils/calls.pyc in __init__(self, yargs, email_info, run_id, run_logs, conditions, mode)
627
628 self.prog_yargs = self.yargs.cuffmerge_options
--> 629 self.set_call_id()
630 self.init_log_file()
631 self.out_dir = self.get_out_dir()
/home/gus/Dropbox/repos/git/blacktie/src/blacktie/utils/calls.pyc in set_call_id(self)
116 self.call_id = call_id
117 else:
--> 118 raise Exception()
119
120 def notify_start_of_call(self):
TypeError: exceptions must be old-style classes or derived from BaseException, not NoneType
這將有助於發佈您的代碼。你有任何機會重新定義在該範圍內的名稱'Exception'是一些可調用的返回None?您可以打開ipython('%pdb')中的pdb,並查看它在什麼時候中斷。 – shx2
不,我沒有重新定義任何東西,並且我改變了'Exception'到許多其他衍生的「提升」。沒關係具體的班級。這個問題不是我的代碼似乎。它來自運行ipython內部的腳本。 (看我的回答) – Gus