[Paraview] pvpython -> extracting timesteps

Berk Geveci berk.geveci at kitware.com
Thu Dec 11 16:00:43 EST 2008


FYI this is fixed in the development (cvs) version.

-berk

On Thu, Nov 6, 2008 at 7:39 PM, Takuya OSHIMA
<oshima at eng.niigata-u.ac.jp> wrote:
> Hi Pierre-Olivier,
>
> If you look at the python examples on the wiki
> http://www.paraview.org/Wiki/ParaView/Python_Scripting
> you'll notice there are two notations used for the extraction of a
> timestep. One is the notation you used and another is
>
> scene.StartTime = reader.TimestepValues.GetData()[0]
>
> at around the bottom of the page. As far as I tried only the latter
> works for the cvs head. Hope someone update the wiki and clarify it...
>
> Takuya OSHIMA, Ph.D.
> Faculty of Engineering, Niigata University
> 8050 Ikarashi-Ninocho, Nishi-ku, Niigata, 950-2181, JAPAN
>
> From: Pierre-Olivier Dallaire <pierre-olivier.dallaire at videotron.ca>
> Subject: [Paraview] pvpython -> extracting timesteps
> Date: Thu, 06 Nov 2008 17:31:59 -0500
>
>> Good afternoon,
>>
>> I've been playing with pvpython this week and I always have this issue when using the time steps :
>>
>> tsteps    = reader.TimestepValues #No problem here
>> view.ViewTime = tsteps[i]             #Gives me an error :
>>
>> Traceback (most recent call last):
>>    File "post.py", line 73, in <module>
>>      view.ViewTime = tsteps[i]
>>    File "/data-cfd01/software/ParaView/src/build_Python2.5/Utilities/VTKPythonWrapping/paraview/servermanager.py", line 1514, in setProperty
>>      return self.SetPropertyWithName(propName, value)
>>    File "/data-cfd01/software/ParaView/src/build_Python2.5/Utilities/VTKPythonWrapping/paraview/servermanager.py", line 163, in SetPropertyWithName
>>      prop.SetData(arg)
>>    File "/data-cfd01/software/ParaView/src/build_Python2.5/Utilities/VTKPythonWrapping/paraview/servermanager.py", line 394, in SetData
>>      self.SMProperty.SetElement(i, self.ConvertValue(values[i]))
>> TypeError: a float is required
>>
>>
>> It's impossible to extract each number from the array  tsteps - any idea ?
>>
>> Thanks !
>>
>> PO
>>
>> _______________________________________________
>> ParaView mailing list
>> ParaView at paraview.org
>> http://www.paraview.org/mailman/listinfo/paraview
> _______________________________________________
> ParaView mailing list
> ParaView at paraview.org
> http://www.paraview.org/mailman/listinfo/paraview
>


More information about the ParaView mailing list