[SciPy-user] weave

Vlado Balko vbalko at gmail.com
Sat Nov 5 06:30:45 CST 2005


Hello,

I`m trying to learn weave to speed up my program but at the example code

    >>> import weave    
    >>> a  = 1
    >>> weave.inline('printf("%d\\n",a);',['a'])
   

I get the error

Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "E:\Program Files\Python\Lib\site-packages\weave\inline_tools.py", line 3
22, in inline
    results = attempt_function_call(code,local_dict,global_dict)
  File "E:\Program Files\Python\Lib\site-packages\weave\inline_tools.py", line 3
72, in attempt_function_call
    function_list = function_catalog.get_functions(code,module_dir)
  File "E:\Program Files\Python\Lib\site-packages\weave\catalog.py", line 568, i
n get_functions
    function_list = self.get_cataloged_functions(code)
  File "E:\Program Files\Python\Lib\site-packages\weave\catalog.py", line 488, i
n get_cataloged_functions
    cat = get_catalog(path,mode)
  File "E:\Program Files\Python\Lib\site-packages\weave\catalog.py", line 262, i
n get_catalog
    if (dumb and os.path.exists(catalog_file+'.dat')) \
  File "E:\Program Files\Python\lib\ntpath.py", line 256, in exists
    st = os.stat(path)
TypeError: coercing to Unicode: need string or buffer, NoneType found
>>>
    

I have Scipy 0.3.2 installed

where is the problem?

balky



More information about the SciPy-user mailing list