dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #04771
Re: Plotting works for elasticity demo
On Thu, Apr 26, 2007 at 11:35:33AM +0200, Ola Skavhaug wrote:
> Garth N. Wells skrev den 26/04-2007 følgende:
> >
> >
> > Ola Skavhaug wrote:
> > >Garth N. Wells skrev den 26/04-2007 følgende:
> > >>
> > >>Ola Skavhaug wrote:
> > >>>Garth N. Wells skrev den 26/04-2007 følgende:
> > >>>>I get the error
> > >>>>
> > >>>>Reading function from elasticity.xml.
> > >>>>Reading vector from file elasticity.xml.
> > >>>>Reading mesh from file elasticity.xml.
> > >>>>Traceback (most recent call last):
> > >>>> File "plot.py", line 4, in ?
> > >>>> plot(u, mode="displacement")
> > >>>>TypeError: plot() got an unexpected keyword argument 'mode'
> > >>>>
> > >>>>when trying to plot.
> > >>>>
> > >>>>Garth
> > >>>Sure, you'll need to pull and install the newest version of viper.
> > >>>Anders had a similar problem (after pulling) yesterday, but we couldn't
> > >>>figure out the error.
> > >>>
> > >>I've pulled the latest version, but I'm still getting the error.
> > >>
> > >>Garth
> > >
> > >What does line 93 in viper_dolfin.py look like? Mine (after a fresh clone)
> > >looks like this:
> > >
> > >def plot(data, *args, **kwargs):
> > >
> >
> > Mine looks exactly the same.
>
> Then there is a problem with your installation, somehow.
>
> Check viper_dolfin.py in the directory given by the following command:
> python -c "import viper; print viper.__file__"
>
> On my computer that is:
> /usr/lib/python2.4/site-packages/viper/__init__.pyc
>
> so /usr/lib/python2.4/site-packages/viper is the directory.
>
> Ola
Perhaps it's a problem with Python 2.4 vs Python 2.5.
PyDOLFIN only builds with Python 2.4 (SWIG generates const-incorrect
C++ code with Python 2.5). Perhaps you installed PyDOLFIN with 2.4 and
now you have installed Viper under Python 2.5?
/Anders
References