[SciPy-user] Weave woes
Paul-Michael Agapow
scipy-pma at agapow.net
Wed Jul 18 11:09:45 EDT 2007
I've got errors installing and using weave, that persist across
different installations and Python versions. My google-fu has failed
me and an identical error reported on the mailing list some time ago
went unanswered.
Symptoms: First I installed weave from svn into Python2.5 and ran
weave.test():
Found 1 tests for weave.ast_tools
[...snip...]
Found 26 tests for weave.catalog
building extensions here: /Users/agapow/.python25_compiled/m3
[...snip...]
Found 3 tests for weave.standard_array_spec
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/
site-packages/weave/tests/test_wx_spec.py:16: DeprecationWarning: The
wxPython compatibility package is no longer automatically generated
or activly maintained. Please switch to the wx package as soon as
possible.
import wxPython
Found 0 tests for weave.wx_spec
Found 0 tests for __main__
...warning: specified build_dir '_bad_path_' does not exist or is
not writable. Trying default locations
.....warning: specified build_dir '_bad_path_' does not exist or
is not writable. Trying default locations
............................removing '/tmp/
tmptBN1Qxcat_test' (and everything under it)
.removing '/tmp/tmpY2WiLfcat_test' (and everything under it)
..............................F..F..................................
...........................
======================================================================
FAIL: check_1d_3
(weave.tests.test_size_check.test_dummy_array_indexing)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/site-packages/weave/tests/test_size_check.py", line 168, in
check_1d_3
self.generic_1d('a[-11:]')
File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/site-packages/weave/tests/test_size_check.py", line 135, in
generic_1d
self.generic_wrap(a,expr)
File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/site-packages/weave/tests/test_size_check.py", line 127, in
generic_wrap
self.generic_test(a,expr,desired)
File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/site-packages/weave/tests/test_size_check.py", line 123, in
generic_test
assert_array_equal(actual,desired, expr)
File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/site-packages/numpy/testing/utils.py", line 223, in
assert_array_equal
verbose=verbose, header='Arrays are not equal')
File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/site-packages/numpy/testing/utils.py", line 215, in
assert_array_compare
assert cond, msg
AssertionError:
Arrays are not equal
a[-11:]
(mismatch 100.0%)
x: array([1])
y: array([10])
======================================================================
FAIL: check_1d_6
(weave.tests.test_size_check.test_dummy_array_indexing)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/site-packages/weave/tests/test_size_check.py", line 174, in
check_1d_6
self.generic_1d('a[:-11]')
File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/site-packages/weave/tests/test_size_check.py", line 135, in
generic_1d
self.generic_wrap(a,expr)
File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/site-packages/weave/tests/test_size_check.py", line 127, in
generic_wrap
self.generic_test(a,expr,desired)
File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/site-packages/weave/tests/test_size_check.py", line 123, in
generic_test
assert_array_equal(actual,desired, expr)
File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/site-packages/numpy/testing/utils.py", line 223, in
assert_array_equal
verbose=verbose, header='Arrays are not equal')
File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/site-packages/numpy/testing/utils.py", line 215, in
assert_array_compare
assert cond, msg
AssertionError:
Arrays are not equal
a[:-11]
(mismatch 100.0%)
x: array([9])
y: array([0])
I'm uncertain if the "__bad_path__" message is important, but the two
errors may relfect issues with numpy (v1.0.1). I installed weave into
Python2.4 for identical symptoms. I then installed the whole Scipy
package just to be sure (weave 0.4.9, numpy 1.0.4.dev3882). No change.
Along the way - mindful that maybe the tests were broken - I tried
out a simple line of weave::
>>> a = 1; weave.inline('printf("%d\\n",a);',['a'])
which gave::
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/site-packages/weave/inline_tools.py", line 325, in inline
results = attempt_function_call(code,local_dict,global_dict)
File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/site-packages/weave/inline_tools.py", line 375, in
attempt_function_call
function_list = function_catalog.get_functions(code,module_dir)
File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/site-packages/weave/catalog.py", line 611, in get_functions
function_list = self.get_cataloged_functions(code)
File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/site-packages/weave/catalog.py", line 524, in
get_cataloged_functions
cat = get_catalog(path,mode)
File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/site-packages/weave/catalog.py", line 294, in get_catalog
or os.path.exists(catalog_file):
File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/posixpath.py", line 171, in exists
st = os.stat(path)
TypeError: coercing to Unicode: need string or buffer, NoneType found
Any ideas on what to try next? (Technical details: MacOSX 10.4.10
Intel macBook, gcc 4.0.1.)
--
Dr Paul-Michael Agapow: VieDigitale / Inst. for Animal Health
pma at viedigitale.com / paul-michael.agapow at bbsrc.ac.uk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20070718/b9a0b80b/attachment.html>
More information about the SciPy-User
mailing list