我想在 Spyder IDE 中使用 PDE Solver Fipy 并尝试按照官方安装指南安装它: 现在建议在使用包之前运行 fipy.test() ,这里出现以下错误。
File "C:\Users\Me\AppData\Roaming\Python\Python27\site-packages\fipy\tests\test.py", line 263, in run_tests
raise exitErr
UnboundLocalError: local variable 'exitErr' referenced before assignment
我不明白这在这种情况下意味着什么,这里是这个错误所指的代码:
try:
unittest.main(
None, None, [unittest.__file__]+self.test_args,
testLoader = loader_class()
)
except SystemExit as exitErr:
# unittest.main(..., exit=...) not available until Python 2.7
from fipy.tests.doctestPlus import report_skips
report_skips()
if self.timetests is not None:
pass
else:
raise
if "legacy" in printoptions:
numerix.set_printoptions(legacy=printoptions["legacy"])
if self.timetests is not None:
from fipy.tests.doctestPlus import _DocTestTimes
import numpy
_DocTestTimes = numpy.rec.fromrecords(_DocTestTimes, formats='f8,S255', names='time,test')
_DocTestTimes.sort(order=('time', 'test'))
numpy.savetxt(self.timetests, _DocTestTimes[::-1], fmt="%8.4f\t%s")
raise exitErr