[SciPy-dev] scipy.weave crashes wth KeyError

Thomas Robitaille thomas.robitaille@gmail....
Wed Sep 23 07:03:39 CDT 2009


Hi,

I'm using a recent svn revision of scipy (5925). After installing it I
went to scipy/weave/examples and ran 'python array3d.py'. I get the
following error message (below). Can other people reproduce this
problem? If not, maybe it's some local installation issue. This
problem occurs with any code that uses weave.inline. I'm using python
2.6 64-bit, but I've also seen reports of the problem on python 2.6
32-bit.

I've tracked the problem down to the following file being empty

.python26_compiled/darwin26compiled_catalog.dat

However, it does look like there are some compiled shared object
libraries in there

air:.python26_compiled tom$ du -sk *
0	darwin26compiled_catalog.dat
192	m0
344	m1
1908	m2
580	m3

So it's not clear if compilation is the problem?

Thanks,

Thomas

---

numpy:
[[[ 0  1  2  3]
  [ 4  5  6  7]
  [ 8  9 10 11]]

 [[12 13 14 15]
  [16 17 18 19]
  [20 21 22 23]]]
Pure Inline:
Traceback (most recent call last):
  File "array3d.py", line 105, in <module>
    main()
  File "array3d.py", line 98, in main
    pure_inline(arr)
  File "array3d.py", line 57, in pure_inline
    weave.inline(code, ['arr'])
  File
"/Users/tom/Library/Python/2.6/site-packages/scipy/weave/inline_tools.py",
line 324, in inline
    results = attempt_function_call(code,local_dict,global_dict)
  File
"/Users/tom/Library/Python/2.6/site-packages/scipy/weave/inline_tools.py",
line 392, in attempt_function_call
    function_list = function_catalog.get_functions(code,module_dir)
  File "/Users/tom/Library/Python/2.6/site-packages/scipy/weave/catalog.py",
line 615, in get_functions
    function_list = self.get_cataloged_functions(code)
  File "/Users/tom/Library/Python/2.6/site-packages/scipy/weave/catalog.py",
line 529, in get_cataloged_functions
    if cat is not None and code in cat:
  File
"/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/shelve.py",
line 110, in __contains__
    return key in self.dict
  File
"/Users/tom/Library/Python/2.6/site-packages/scipy/io/dumbdbm_patched.py",
line 73, in __getitem__
    pos, siz = self._index[key] # may raise KeyError
KeyError: 0


More information about the Scipy-dev mailing list