← Back to team overview

dolfin team mailing list archive

Re: FunctionSpace error in python

 

On Thursday 22 January 2009 16:29:58 A Navaei wrote:
> Hi,
>
> Since updating to 0.9.0-1+intrepid1, when calling FunctionSpace in
> python, I receive the following error generated by swig python
> wrapper:
>
> Traceback (most recent call last):
>   File "../tests/test04.py", line 15, in <module>
>     V = FunctionSpace(mesh, "CG", 1)
>   File "/usr/lib/python2.5/site-packages/dolfin/functionspace.py",
> line 183, in __init__
>     FunctionSpaceBase.__init__(self, mesh, element)
>   File "/usr/lib/python2.5/site-packages/dolfin/functionspace.py",
> line 48, in __init__
>     self.__dolfin_element = cpp.FiniteElement(self.__ufc_element)
>   File "/usr/lib/python2.5/site-packages/dolfin/cpp.py", line 9755, in
> __init__ this = _cpp.new_FiniteElement(*args)
> TypeError: in method 'new_FiniteElement', argument 1 of type 'std::string'
>
> Clean re-installation did hot help this. Any idea what could be wrong?

Hello Ali!

The error is that swig cannot recognize the type of the self.__ufc_element, 
when creating a cpp.FiniteElement. The ufc_element is generated by ffc.

Do you use the development version of any packages, for example ffc or ufc? 
These are not compatible with the ubuntu package of DOLFIN.

Johan


References