[f2py] Re: TypeError: cannot concatenate 'str' and 'list' objects

Peter Schmitt pschmittml at gmail.com
Fri Nov 16 01:43:49 EET 2007


Short term fix:  edit line 1222 of
["/opt/python2.5/lib/python2.5/site-packages/numpy/f2py/rules.py"]:

OLD:
>     for l in '\n\n'.join(funcwrappers2)+'\n'.split('\n'):

NEW:
>     for l in '(\n\n'.join(funcwrappers2)+'\n').split('\n'):

I think it's a bug... I haven't submitted an official bug report yet.
I was hoping that someone (i.e. Pearu or the likes) would've responded
to my original post
[http://cens.ioc.ee/pipermail/f2py-users/2007-November/001479.html]
before making an official bug report.

In any case, the above fix works for me

Cheers,
Pete

PS:  If what i said above makes no sense, look at the patch I proposed
at  [http://cens.ioc.ee/pipermail/f2py-users/2007-November/001479.html]

On Nov 13, 2007 12:20 PM, C.A.(Sandy) Mader <mader at utias.utoronto.ca> wrote:
>
> I noticed this bug in a previous post but didn't see any resolution. I
> am running into the same thing.
>
> Traceback (most recent call last):
>   File "/opt/python2.5/bin/f2py", line 26, in <module>
>     main()
>   File
> "/opt/python2.5/lib/python2.5/site-packages/numpy/f2py/f2py2e.py", line
> 560, in main
>     run_main(sys.argv[1:])
>   File
> "/opt/python2.5/lib/python2.5/site-packages/numpy/f2py/f2py2e.py", line
> 367, in run_main
>     ret=buildmodules(postlist)
>   File
> "/opt/python2.5/lib/python2.5/site-packages/numpy/f2py/f2py2e.py", line
> 319, in buildmodules
>     dict_append(ret[mnames[i]],rules.buildmodule(modules[i],um))
>   File "/opt/python2.5/lib/python2.5/site-packages/numpy/f2py/rules.py",
> line 1222, in buildmodule
>     for l in '\n\n'.join(funcwrappers2)+'\n'.split('\n'):
> TypeError: cannot concatenate 'str' and 'list' objects
> Error: Failed to generate wrapping source.
>
> Is this a bug? If so has there been any resolution?
> I am running python 2.5, numpy version 1.0.4, f2py version 2_4422
>
> --
> C.A.(Sandy) Mader
> PhD Candidate
> Multidisciplinary Design Optimization Laboratory
> University of Toronto Institute for Aerospace Studies
> http://mdolab.utias.utoronto.ca/people/mader
>
>
> _______________________________________________
> f2py-users mailing list
> f2py-users at cens.ioc.ee
> http://cens.ioc.ee/mailman/listinfo/f2py-users
>



More information about the f2py-users mailing list