[SciPy-user] can't get weave to run

James Coughlan coughlan at ski.org
Thu Oct 5 15:34:35 CDT 2006


When I try to run a simple weave example:

from scipy import weave
a=1
weave.inline('printf("%d",a);',['a'])

I get this error message:

Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "C:\PYTHON24\lib\site-packages\scipy\weave\inline_tools.py", line 
325, in inline
    results = attempt_function_call(code,local_dict,global_dict)
  File "C:\PYTHON24\lib\site-packages\scipy\weave\inline_tools.py", line 
375, in attempt_function_call
    function_list = function_catalog.get_functions(code,module_dir)
  File "C:\PYTHON24\lib\site-packages\scipy\weave\catalog.py", line 593, 
in get_functions
    function_list = self.get_cataloged_functions(code)
  File "C:\PYTHON24\lib\site-packages\scipy\weave\catalog.py", line 506, 
in get_cataloged_functions
    cat = get_catalog(path,mode)
  File "C:\PYTHON24\lib\site-packages\scipy\weave\catalog.py", line 275, 
in get_catalog
    if (dumb and os.path.exists(catalog_file+'.dat')) \
  File "C:\Python24\lib\ntpath.py", line 256, in exists
    st = os.stat(path)
TypeError: coercing to Unicode: need string or buffer, NoneType found

I am running Python Enthought Edition--Python 2.4.3 for Windows Enhanced 
Python Distribution, which includes SciPy version 0.5.0.2033. (Weave 
used to work on my computer, back when I was using Python 2.3.)

Does anybody have some suggestions?

Thanks,
James

PS When I run weave.test() I get some successes and some error messages:

  Found 16 tests for scipy.weave.slice_handler
  Found 0 tests for scipy.weave.c_spec
  Found 2 tests for scipy.weave.blitz_tools
building extensions here: 
c:\docume~1\james\locals~1\temp\James\python24_compiled\m0
  Found 1 tests for scipy.weave.ext_tools
  Found 74 tests for scipy.weave.size_check
  Found 9 tests for scipy.weave.build_tools
  Found 0 tests for scipy.weave.inline_tools
  Found 1 tests for scipy.weave.ast_tools
  Found 0 tests for scipy.weave.wx_spec
  Found 3 tests for scipy.weave.standard_array_spec
  Found 26 tests for scipy.weave.catalog
  Found 0 tests for __main__
.............................................................................................warning: 
specified build_dir '_bad_pa
th_' 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 
'c:\docume~1\james\locals~1\temp\tmpgr3vnecat_test' (and everything 
under it)
error removing c:\docume~1\james\locals~1\temp\tmpgr3vnecat_test: 
c:\docume~1\james\locals~1\temp\tmpgr3vnecat_test\win3224compile
d_catalog: Permission denied
error removing c:\docume~1\james\locals~1\temp\tmpgr3vnecat_test: 
c:\docume~1\james\locals~1\temp\tmpgr3vnecat_test: Directory not
 empty
.removing 'c:\docume~1\james\locals~1\temp\tmpfw6kvscat_test' (and 
everything under it)
.
----------------------------------------------------------------------
Ran 132 tests in 3.264s

OK
<unittest.TextTestRunner object at 0x0116DBF0>



More information about the SciPy-user mailing list