[SciPy-user] Weave woes

Nils Wagner nwagner at iam.uni-stuttgart.de
Wed Jul 18 11:15:13 EDT 2007


Paul-Michael Agapow wrote:
>
> 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 <mailto:pma at viedigitale.com> /
> paul-michael.agapow at bbsrc.ac.uk <mailto:paul-michael.agapow at bbsrc.ac.uk>
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> SciPy-user mailing list
> SciPy-user at scipy.org
> http://projects.scipy.org/mailman/listinfo/scipy-user
>   
I can confirm failures on SuSE 64-bit (latest svn)

python -i
/usr/lib64/python2.4/site-packages/scipy/weave/tests/test_size_check.py
  Found 74 tests for weave.size_check
  Found 0 tests for __main__
............................F..F..........................................
======================================================================
FAIL: check_1d_3 (weave.tests.test_size_check.test_dummy_array_indexing)
----------------------------------------------------------------------
Traceback (most recent call last):
  File
"/usr/lib64/python2.4/site-packages/scipy/weave/tests/test_size_check.py",
line 168, in check_1d_3
    self.generic_1d('a[-11:]')
  File
"/usr/lib64/python2.4/site-packages/scipy/weave/tests/test_size_check.py",
line 135, in generic_1d
    self.generic_wrap(a,expr)
  File
"/usr/lib64/python2.4/site-packages/scipy/weave/tests/test_size_check.py",
line 127, in generic_wrap
    self.generic_test(a,expr,desired)
  File
"/usr/lib64/python2.4/site-packages/scipy/weave/tests/test_size_check.py",
line 123, in generic_test
    assert_array_equal(actual,desired, expr)
  File "/usr/lib64/python2.4/site-packages/numpy/testing/utils.py", line
223, in assert_array_equal
    verbose=verbose, header='Arrays are not equal')
  File "/usr/lib64/python2.4/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
"/usr/lib64/python2.4/site-packages/scipy/weave/tests/test_size_check.py",
line 174, in check_1d_6
    self.generic_1d('a[:-11]')
  File
"/usr/lib64/python2.4/site-packages/scipy/weave/tests/test_size_check.py",
line 135, in generic_1d
    self.generic_wrap(a,expr)
  File
"/usr/lib64/python2.4/site-packages/scipy/weave/tests/test_size_check.py",
line 127, in generic_wrap
    self.generic_test(a,expr,desired)
  File
"/usr/lib64/python2.4/site-packages/scipy/weave/tests/test_size_check.py",
line 123, in generic_test
    assert_array_equal(actual,desired, expr)
  File "/usr/lib64/python2.4/site-packages/numpy/testing/utils.py", line
223, in assert_array_equal
    verbose=verbose, header='Arrays are not equal')
  File "/usr/lib64/python2.4/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])

----------------------------------------------------------------------
Ran 74 tests in 0.248s

FAILED (failures=2)

Nils


 




More information about the SciPy-User mailing list