scipy-weave unit tests fail on KeyError

Hi, I compiled SciPy and Numpy on a machine with Scientific Linux (64bit). We detected a problem with Weave and after investigation, it turns out that some of the unit tests delivered with Scipy-Weave also fail ! Below is a list of tests that fail in for example the "test_c_spec" file. They all raise a KeyError. This is with SciPy 0.7.1 on Python 2.6. I also downloaded the latest Weave code again from the SVN repository (trunk), but the problem is not resolved. Any idea on how to tackle this problem? There are no posts that help me further. It looks like the compilation done by Weave works fine (see sample stdout also below), but afterwards, he cannot find the compiled code in the list. What could cause this? thanks for any help. Emmanuel ******************* SAMPLE OF STDOUT ****************** -------------------- >> begin captured stdout << --------------------- <weave: compiling> running build_ext running build_src building extension "sc_d133102ab45193e072f8dbb5a1f6848513" sources customize UnixCCompiler customize UnixCCompiler using build_ext customize UnixCCompiler customize UnixCCompiler using build_ext building 'sc_d133102ab45193e072f8dbb5a1f6848513' extension compiling C++ sources C compiler: g++ -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 - Wall -fPIC compile options: '-I/user/home/gent/vsc401/vsc40157/scipy-runtime/ scipy/weave -I/user/home/gent/vsc401/vsc40157/scipy-runtime/scipy/ weave/scxx -I/user/home/gent/vsc401/vsc40157/numpy-runtime/numpy/core/ include -I/apps/gent/gengar/harpertown/software/Python/2.6.2- gimkl-0.5.0/include/python2.6 -c' g++: /user/home/gent/vsc401/vsc40157/.python26_compiled/ sc_d133102ab45193e072f8dbb5a1f6848513.cpp g++ -pthread -shared /tmp/vsc40157/python26_intermediate/ compiler_c1b5f1b73f1ce7d0c836cdad4c7c5ded/user/home/gent/vsc401/ vsc40157/.python26_compiled/sc_d133102ab45193e072f8dbb5a1f6848513.o / tmp/vsc40157/python26_intermediate/ compiler_c1b5f1b73f1ce7d0c836cdad4c7c5ded/user/home/gent/vsc401/ vsc40157/scipy-runtime/scipy/weave/scxx/weave_imp.o -o /user/home/gent/ vsc401/vsc40157/.python26_compiled/ sc_d133102ab45193e072f8dbb5a1f6848513.so running scons --------------------- >> end captured stdout << ---------------------- ********************** TESTS THAT FAIL *********************** -bash-3.2$ python ./test_c_spec.py E..........EE.................EEEE......E..........EE.................EEEE.............. ====================================================================== ERROR: test_call_function (test_c_spec.CallableConverter) ---------------------------------------------------------------------- Traceback (most recent call last): File "/user/home/gent/vsc401/vsc40157/scipy-runtime/scipy/weave/ tests/test_c_spec.py", line 296, in test_call_function compiler=self.compiler,force=1) File "/user/home/gent/vsc401/vsc40157/scipy-runtime/scipy/weave/ inline_tools.py", line 301, in inline function_catalog.add_function(code,func,module_dir) File "/user/home/gent/vsc401/vsc40157/scipy-runtime/scipy/weave/ catalog.py", line 648, in add_function self.cache[code] = self.get_functions(code) File "/user/home/gent/vsc401/vsc40157/scipy-runtime/scipy/weave/ catalog.py", line 615, in get_functions function_list = self.get_cataloged_functions(code) File "/user/home/gent/vsc401/vsc40157/scipy-runtime/scipy/weave/ catalog.py", line 529, in get_cataloged_functions if cat is not None and code in cat: File "/apps/gent/gengar/harpertown/software/Python/2.6.2-gimkl-0.5.0/ lib/python2.6/shelve.py", line 110, in __contains__ return key in self.dict File "/user/home/gent/vsc401/vsc40157/scipy-runtime/scipy/io/ dumbdbm_patched.py", line 73, in __getitem__ pos, siz = self._index[key] # may raise KeyError KeyError: 0 ====================================================================== ERROR: test_file_to_py (test_c_spec.FileConverter) ---------------------------------------------------------------------- Traceback (most recent call last): File "/user/home/gent/vsc401/vsc40157/scipy-runtime/scipy/weave/ tests/test_c_spec.py", line 262, in test_file_to_py force=1) File "/user/home/gent/vsc401/vsc40157/scipy-runtime/scipy/weave/ inline_tools.py", line 301, in inline function_catalog.add_function(code,func,module_dir) File "/user/home/gent/vsc401/vsc40157/scipy-runtime/scipy/weave/ catalog.py", line 648, in add_function self.cache[code] = self.get_functions(code) File "/user/home/gent/vsc401/vsc40157/scipy-runtime/scipy/weave/ catalog.py", line 615, in get_functions function_list = self.get_cataloged_functions(code) File "/user/home/gent/vsc401/vsc40157/scipy-runtime/scipy/weave/ catalog.py", line 529, in get_cataloged_functions if cat is not None and code in cat: File "/apps/gent/gengar/harpertown/software/Python/2.6.2-gimkl-0.5.0/ lib/python2.6/shelve.py", line 110, in __contains__ return key in self.dict File "/user/home/gent/vsc401/vsc40157/scipy-runtime/scipy/io/ dumbdbm_patched.py", line 73, in __getitem__ pos, siz = self._index[key] # may raise KeyError KeyError: 0 ====================================================================== ERROR: test_py_to_file (test_c_spec.FileConverter) ---------------------------------------------------------------------- Traceback (most recent call last): File "/user/home/gent/vsc401/vsc40157/scipy-runtime/scipy/weave/ tests/test_c_spec.py", line 246, in test_py_to_file inline_tools.inline(code,['file'],compiler=self.compiler,force=1) File "/user/home/gent/vsc401/vsc40157/scipy-runtime/scipy/weave/ inline_tools.py", line 301, in inline function_catalog.add_function(code,func,module_dir) File "/user/home/gent/vsc401/vsc40157/scipy-runtime/scipy/weave/ catalog.py", line 648, in add_function self.cache[code] = self.get_functions(code) File "/user/home/gent/vsc401/vsc40157/scipy-runtime/scipy/weave/ catalog.py", line 615, in get_functions function_list = self.get_cataloged_functions(code) File "/user/home/gent/vsc401/vsc40157/scipy-runtime/scipy/weave/ catalog.py", line 529, in get_cataloged_functions if cat is not None and code in cat: File "/apps/gent/gengar/harpertown/software/Python/2.6.2-gimkl-0.5.0/ lib/python2.6/shelve.py", line 110, in __contains__ return key in self.dict File "/user/home/gent/vsc401/vsc40157/scipy-runtime/scipy/io/ dumbdbm_patched.py", line 73, in __getitem__ pos, siz = self._index[key] # may raise KeyError KeyError: 0 ====================================================================== ERROR: test_convert_to_dict (test_c_spec.SequenceConverter) ---------------------------------------------------------------------- Traceback (most recent call last): File "/user/home/gent/vsc401/vsc40157/scipy-runtime/scipy/weave/ tests/test_c_spec.py", line 305, in test_convert_to_dict inline_tools.inline("",['d'],compiler=self.compiler,force=1) File "/user/home/gent/vsc401/vsc40157/scipy-runtime/scipy/weave/ inline_tools.py", line 301, in inline function_catalog.add_function(code,func,module_dir) File "/user/home/gent/vsc401/vsc40157/scipy-runtime/scipy/weave/ catalog.py", line 648, in add_function self.cache[code] = self.get_functions(code) File "/user/home/gent/vsc401/vsc40157/scipy-runtime/scipy/weave/ catalog.py", line 615, in get_functions function_list = self.get_cataloged_functions(code) File "/user/home/gent/vsc401/vsc40157/scipy-runtime/scipy/weave/ catalog.py", line 529, in get_cataloged_functions if cat is not None and code in cat: File "/apps/gent/gengar/harpertown/software/Python/2.6.2-gimkl-0.5.0/ lib/python2.6/shelve.py", line 110, in __contains__ return key in self.dict File "/user/home/gent/vsc401/vsc40157/scipy-runtime/scipy/io/ dumbdbm_patched.py", line 73, in __getitem__ pos, siz = self._index[key] # may raise KeyError KeyError: 0 ====================================================================== ERROR: test_convert_to_list (test_c_spec.SequenceConverter) ---------------------------------------------------------------------- Traceback (most recent call last): File "/user/home/gent/vsc401/vsc40157/scipy-runtime/scipy/weave/ tests/test_c_spec.py", line 309, in test_convert_to_list inline_tools.inline("",['l'],compiler=self.compiler,force=1) File "/user/home/gent/vsc401/vsc40157/scipy-runtime/scipy/weave/ inline_tools.py", line 301, in inline function_catalog.add_function(code,func,module_dir) File "/user/home/gent/vsc401/vsc40157/scipy-runtime/scipy/weave/ catalog.py", line 648, in add_function self.cache[code] = self.get_functions(code) File "/user/home/gent/vsc401/vsc40157/scipy-runtime/scipy/weave/ catalog.py", line 615, in get_functions function_list = self.get_cataloged_functions(code) File "/user/home/gent/vsc401/vsc40157/scipy-runtime/scipy/weave/ catalog.py", line 529, in get_cataloged_functions if cat is not None and code in cat: File "/apps/gent/gengar/harpertown/software/Python/2.6.2-gimkl-0.5.0/ lib/python2.6/shelve.py", line 110, in __contains__ return key in self.dict File "/user/home/gent/vsc401/vsc40157/scipy-runtime/scipy/io/ dumbdbm_patched.py", line 73, in __getitem__ pos, siz = self._index[key] # may raise KeyError KeyError: 0 ====================================================================== ERROR: test_convert_to_string (test_c_spec.SequenceConverter) ---------------------------------------------------------------------- Traceback (most recent call last): File "/user/home/gent/vsc401/vsc40157/scipy-runtime/scipy/weave/ tests/test_c_spec.py", line 313, in test_convert_to_string inline_tools.inline("",['s'],compiler=self.compiler,force=1) File "/user/home/gent/vsc401/vsc40157/scipy-runtime/scipy/weave/ inline_tools.py", line 301, in inline function_catalog.add_function(code,func,module_dir) File "/user/home/gent/vsc401/vsc40157/scipy-runtime/scipy/weave/ catalog.py", line 648, in add_function self.cache[code] = self.get_functions(code) File "/user/home/gent/vsc401/vsc40157/scipy-runtime/scipy/weave/ catalog.py", line 615, in get_functions function_list = self.get_cataloged_functions(code) File "/user/home/gent/vsc401/vsc40157/scipy-runtime/scipy/weave/ catalog.py", line 529, in get_cataloged_functions if cat is not None and code in cat: File "/apps/gent/gengar/harpertown/software/Python/2.6.2-gimkl-0.5.0/ lib/python2.6/shelve.py", line 110, in __contains__ return key in self.dict File "/user/home/gent/vsc401/vsc40157/scipy-runtime/scipy/io/ dumbdbm_patched.py", line 73, in __getitem__ pos, siz = self._index[key] # may raise KeyError KeyError: 0 ====================================================================== ERROR: test_convert_to_tuple (test_c_spec.SequenceConverter) ---------------------------------------------------------------------- Traceback (most recent call last): File "/user/home/gent/vsc401/vsc40157/scipy-runtime/scipy/weave/ tests/test_c_spec.py", line 317, in test_convert_to_tuple inline_tools.inline("",['t'],compiler=self.compiler,force=1) File "/user/home/gent/vsc401/vsc40157/scipy-runtime/scipy/weave/ inline_tools.py", line 301, in inline function_catalog.add_function(code,func,module_dir) File "/user/home/gent/vsc401/vsc40157/scipy-runtime/scipy/weave/ catalog.py", line 648, in add_function self.cache[code] = self.get_functions(code) File "/user/home/gent/vsc401/vsc40157/scipy-runtime/scipy/weave/ catalog.py", line 615, in get_functions function_list = self.get_cataloged_functions(code) File "/user/home/gent/vsc401/vsc40157/scipy-runtime/scipy/weave/ catalog.py", line 529, in get_cataloged_functions if cat is not None and code in cat: File "/apps/gent/gengar/harpertown/software/Python/2.6.2-gimkl-0.5.0/ lib/python2.6/shelve.py", line 110, in __contains__ return key in self.dict File "/user/home/gent/vsc401/vsc40157/scipy-runtime/scipy/io/ dumbdbm_patched.py", line 73, in __getitem__ pos, siz = self._index[key] # may raise KeyError KeyError: 0 ====================================================================== ERROR: test_call_function (test_c_spec.TestCallableConverterUnix) ---------------------------------------------------------------------- Traceback (most recent call last): File "/user/home/gent/vsc401/vsc40157/scipy-runtime/scipy/weave/ tests/test_c_spec.py", line 296, in test_call_function compiler=self.compiler,force=1) File "/user/home/gent/vsc401/vsc40157/scipy-runtime/scipy/weave/ inline_tools.py", line 301, in inline function_catalog.add_function(code,func,module_dir) File "/user/home/gent/vsc401/vsc40157/scipy-runtime/scipy/weave/ catalog.py", line 648, in add_function self.cache[code] = self.get_functions(code) File "/user/home/gent/vsc401/vsc40157/scipy-runtime/scipy/weave/ catalog.py", line 615, in get_functions function_list = self.get_cataloged_functions(code) File "/user/home/gent/vsc401/vsc40157/scipy-runtime/scipy/weave/ catalog.py", line 529, in get_cataloged_functions if cat is not None and code in cat: File "/apps/gent/gengar/harpertown/software/Python/2.6.2-gimkl-0.5.0/ lib/python2.6/shelve.py", line 110, in __contains__ return key in self.dict File "/user/home/gent/vsc401/vsc40157/scipy-runtime/scipy/io/ dumbdbm_patched.py", line 73, in __getitem__ pos, siz = self._index[key] # may raise KeyError KeyError: 0 ====================================================================== ERROR: test_file_to_py (test_c_spec.TestFileConverterUnix) ---------------------------------------------------------------------- Traceback (most recent call last): File "/user/home/gent/vsc401/vsc40157/scipy-runtime/scipy/weave/ tests/test_c_spec.py", line 262, in test_file_to_py force=1) File "/user/home/gent/vsc401/vsc40157/scipy-runtime/scipy/weave/ inline_tools.py", line 301, in inline function_catalog.add_function(code,func,module_dir) File "/user/home/gent/vsc401/vsc40157/scipy-runtime/scipy/weave/ catalog.py", line 648, in add_function self.cache[code] = self.get_functions(code) File "/user/home/gent/vsc401/vsc40157/scipy-runtime/scipy/weave/ catalog.py", line 615, in get_functions function_list = self.get_cataloged_functions(code) File "/user/home/gent/vsc401/vsc40157/scipy-runtime/scipy/weave/ catalog.py", line 529, in get_cataloged_functions if cat is not None and code in cat: File "/apps/gent/gengar/harpertown/software/Python/2.6.2-gimkl-0.5.0/ lib/python2.6/shelve.py", line 110, in __contains__ return key in self.dict File "/user/home/gent/vsc401/vsc40157/scipy-runtime/scipy/io/ dumbdbm_patched.py", line 73, in __getitem__ pos, siz = self._index[key] # may raise KeyError KeyError: 0 ====================================================================== ERROR: test_py_to_file (test_c_spec.TestFileConverterUnix) ---------------------------------------------------------------------- Traceback (most recent call last): File "/user/home/gent/vsc401/vsc40157/scipy-runtime/scipy/weave/ tests/test_c_spec.py", line 246, in test_py_to_file inline_tools.inline(code,['file'],compiler=self.compiler,force=1) File "/user/home/gent/vsc401/vsc40157/scipy-runtime/scipy/weave/ inline_tools.py", line 301, in inline function_catalog.add_function(code,func,module_dir) File "/user/home/gent/vsc401/vsc40157/scipy-runtime/scipy/weave/ catalog.py", line 648, in add_function self.cache[code] = self.get_functions(code) File "/user/home/gent/vsc401/vsc40157/scipy-runtime/scipy/weave/ catalog.py", line 615, in get_functions function_list = self.get_cataloged_functions(code) File "/user/home/gent/vsc401/vsc40157/scipy-runtime/scipy/weave/ catalog.py", line 529, in get_cataloged_functions if cat is not None and code in cat: File "/apps/gent/gengar/harpertown/software/Python/2.6.2-gimkl-0.5.0/ lib/python2.6/shelve.py", line 110, in __contains__ return key in self.dict File "/user/home/gent/vsc401/vsc40157/scipy-runtime/scipy/io/ dumbdbm_patched.py", line 73, in __getitem__ pos, siz = self._index[key] # may raise KeyError KeyError: 0 ====================================================================== ERROR: test_convert_to_dict (test_c_spec.TestSequenceConverterUnix) ---------------------------------------------------------------------- Traceback (most recent call last): File "/user/home/gent/vsc401/vsc40157/scipy-runtime/scipy/weave/ tests/test_c_spec.py", line 305, in test_convert_to_dict inline_tools.inline("",['d'],compiler=self.compiler,force=1) File "/user/home/gent/vsc401/vsc40157/scipy-runtime/scipy/weave/ inline_tools.py", line 301, in inline function_catalog.add_function(code,func,module_dir) File "/user/home/gent/vsc401/vsc40157/scipy-runtime/scipy/weave/ catalog.py", line 648, in add_function self.cache[code] = self.get_functions(code) File "/user/home/gent/vsc401/vsc40157/scipy-runtime/scipy/weave/ catalog.py", line 615, in get_functions function_list = self.get_cataloged_functions(code) File "/user/home/gent/vsc401/vsc40157/scipy-runtime/scipy/weave/ catalog.py", line 529, in get_cataloged_functions if cat is not None and code in cat: File "/apps/gent/gengar/harpertown/software/Python/2.6.2-gimkl-0.5.0/ lib/python2.6/shelve.py", line 110, in __contains__ return key in self.dict File "/user/home/gent/vsc401/vsc40157/scipy-runtime/scipy/io/ dumbdbm_patched.py", line 73, in __getitem__ pos, siz = self._index[key] # may raise KeyError KeyError: 0 ====================================================================== ERROR: test_convert_to_list (test_c_spec.TestSequenceConverterUnix) ---------------------------------------------------------------------- Traceback (most recent call last): File "/user/home/gent/vsc401/vsc40157/scipy-runtime/scipy/weave/ tests/test_c_spec.py", line 309, in test_convert_to_list inline_tools.inline("",['l'],compiler=self.compiler,force=1) File "/user/home/gent/vsc401/vsc40157/scipy-runtime/scipy/weave/ inline_tools.py", line 301, in inline function_catalog.add_function(code,func,module_dir) File "/user/home/gent/vsc401/vsc40157/scipy-runtime/scipy/weave/ catalog.py", line 648, in add_function self.cache[code] = self.get_functions(code) File "/user/home/gent/vsc401/vsc40157/scipy-runtime/scipy/weave/ catalog.py", line 615, in get_functions function_list = self.get_cataloged_functions(code) File "/user/home/gent/vsc401/vsc40157/scipy-runtime/scipy/weave/ catalog.py", line 529, in get_cataloged_functions if cat is not None and code in cat: File "/apps/gent/gengar/harpertown/software/Python/2.6.2-gimkl-0.5.0/ lib/python2.6/shelve.py", line 110, in __contains__ return key in self.dict File "/user/home/gent/vsc401/vsc40157/scipy-runtime/scipy/io/ dumbdbm_patched.py", line 73, in __getitem__ pos, siz = self._index[key] # may raise KeyError KeyError: 0 ====================================================================== ERROR: test_convert_to_string (test_c_spec.TestSequenceConverterUnix) ---------------------------------------------------------------------- Traceback (most recent call last): File "/user/home/gent/vsc401/vsc40157/scipy-runtime/scipy/weave/ tests/test_c_spec.py", line 313, in test_convert_to_string inline_tools.inline("",['s'],compiler=self.compiler,force=1) File "/user/home/gent/vsc401/vsc40157/scipy-runtime/scipy/weave/ inline_tools.py", line 301, in inline function_catalog.add_function(code,func,module_dir) File "/user/home/gent/vsc401/vsc40157/scipy-runtime/scipy/weave/ catalog.py", line 648, in add_function self.cache[code] = self.get_functions(code) File "/user/home/gent/vsc401/vsc40157/scipy-runtime/scipy/weave/ catalog.py", line 615, in get_functions function_list = self.get_cataloged_functions(code) File "/user/home/gent/vsc401/vsc40157/scipy-runtime/scipy/weave/ catalog.py", line 529, in get_cataloged_functions if cat is not None and code in cat: File "/apps/gent/gengar/harpertown/software/Python/2.6.2-gimkl-0.5.0/ lib/python2.6/shelve.py", line 110, in __contains__ return key in self.dict File "/user/home/gent/vsc401/vsc40157/scipy-runtime/scipy/io/ dumbdbm_patched.py", line 73, in __getitem__ pos, siz = self._index[key] # may raise KeyError KeyError: 0 ====================================================================== ERROR: test_convert_to_tuple (test_c_spec.TestSequenceConverterUnix) ---------------------------------------------------------------------- Traceback (most recent call last): File "/user/home/gent/vsc401/vsc40157/scipy-runtime/scipy/weave/ tests/test_c_spec.py", line 317, in test_convert_to_tuple inline_tools.inline("",['t'],compiler=self.compiler,force=1) File "/user/home/gent/vsc401/vsc40157/scipy-runtime/scipy/weave/ inline_tools.py", line 301, in inline function_catalog.add_function(code,func,module_dir) File "/user/home/gent/vsc401/vsc40157/scipy-runtime/scipy/weave/ catalog.py", line 648, in add_function self.cache[code] = self.get_functions(code) File "/user/home/gent/vsc401/vsc40157/scipy-runtime/scipy/weave/ catalog.py", line 615, in get_functions function_list = self.get_cataloged_functions(code) File "/user/home/gent/vsc401/vsc40157/scipy-runtime/scipy/weave/ catalog.py", line 529, in get_cataloged_functions if cat is not None and code in cat: File "/apps/gent/gengar/harpertown/software/Python/2.6.2-gimkl-0.5.0/ lib/python2.6/shelve.py", line 110, in __contains__ return key in self.dict File "/user/home/gent/vsc401/vsc40157/scipy-runtime/scipy/io/ dumbdbm_patched.py", line 73, in __getitem__ pos, siz = self._index[key] # may raise KeyError KeyError: 0 ---------------------------------------------------------------------- Ran 88 tests in 32.581s FAILED (errors=14)
participants (1)
-
Emmanuel Lambert