[Paraview] State file .py

Hedieh Ebrahimi hedieh.ebrahimi at amphos21.com
Thu Oct 31 04:31:56 EDT 2013


Hi Utkarsh,

Thanks, applying this trick, it works now.

Thanks for your help.


On 30 October 2013 21:46, Utkarsh Ayachit <utkarsh.ayachit at kitware.com>wrote:

> Try removing the check at the top i.e
>
> ---- replace ---
> try: paraview.simple
> except: from paraview.simple import *
> __ with ____
> from paraview.simple import *
> --------------------
>
> That should do the trick.
>
>
> On Wed, Oct 30, 2013 at 10:34 AM, Hedieh Ebrahimi
> <hedieh.ebrahimi at amphos21.com> wrote:
> > In addition I need to add that I just get the error when I try to open my
> > state.py from the python shell. If I for example add an WriteImage at the
> > end of script and try to open it using pvpython then it works fine and i
> get
> > an image, but trying to open interactively I get in to error.
> >
> > Thanks for help
> >
> >
> >
> > On 30 October 2013 15:07, Hedieh Ebrahimi <hedieh.ebrahimi at amphos21.com>
> > wrote:
> >>
> >> Here is one of my state files with associated error:
> >> Python 2.7.3 (default, Jun 16 2013, 20:21:46) [MSC v.1500 64 bit
> (AMD64)]
> >> on win32
> >>
> >> from paraview.simple import *
> >>
> >> paraview version 4.0.1
> >>
> >> >>>
> >>
> >>
> >> >>> Traceback (most recent call last):
> >>
> >> File "<string>", line 5, in <module>
> >>
> >> NameError: name 'CreateRenderView' is not defined
> >>
> >>
> >> Could it have anything to do with Python version? ParaView seems to be
> >> using Python 2.7.3 which i guess comes with ParaView. Is ParaView using
> its
> >> own Python?
> >>
> >> I am saying this because by default I have  Python 3.2.5 installed.
> >> any ideas?
> >>
> >>
> >>
> >>
> >> On 30 October 2013 14:51, Utkarsh Ayachit <utkarsh.ayachit at kitware.com>
> >> wrote:
> >>>
> >>> That's odd. Mind sending me your script?
> >>>
> >>> On Wed, Oct 30, 2013 at 9:50 AM, Hedieh Ebrahimi
> >>> <hedieh.ebrahimi at amphos21.com> wrote:
> >>> > Hi Utkarsh,
> >>> >
> >>> > I also tried with loading the script from Python Shell,
> >>> >
> >>> > and It gives me this error on all my scripts.
> >>> >
> >>> > Traceback (most recent call last):
> >>> >
> >>> > File "<string>", line 13, in <module>
> >>> >
> >>> > NameError: name 'CreateRenderView' is not defined
> >>> >
> >>> >
> >>> >
> >>> > Although it is created at line 13.
> >>> >
> >>> > RenderView1 = CreateRenderView()
> >>> >
> >>> >
> >>> > Any ideas on what is wrong with my script.
> >>> >
> >>> > Thanks
> >>> > Hedieh
> >>> >
> >>> >
> >>> >
> >>> > On 30 October 2013 14:42, Utkarsh Ayachit <
> utkarsh.ayachit at kitware.com>
> >>> > wrote:
> >>> >>
> >>> >> Python state files cannot be loaded from "Load State" ( as I write
> >>> >> this I realize that that is indeed a missing feature). You can  use
> >>> >> the Python shell to load the script.
> >>> >>
> >>> >> Utkarsh
> >>> >>
> >>> >> On Wed, Oct 30, 2013 at 8:34 AM, Hedieh Ebrahimi
> >>> >> <hedieh.ebrahimi at amphos21.com> wrote:
> >>> >> > Hi all,
> >>> >> >
> >>> >> > I am using ParaView 4.0.1 64 bit Release version.
> >>> >> >
> >>> >> > When i try to save a statefile as .py it saves correctly, but
> when I
> >>> >> > try
> >>> >> > to
> >>> >> > open the same state file again using the same ParaView i get the
> >>> >> > following
> >>> >> > error.
> >>> >> >
> >>> >> >
> >>> >> > ERROR: In
> >>> >> >
> >>> >> >
> C:\DBD\pvs-x64\paraview\src\paraview\VTK\IO\XMLParser\vtkXMLParser.cxx,
> >>> >> > line
> >>> >> > 483
> >>> >> >
> >>> >> > vtkPVXMLParser (000000000A864BC0): Error parsing XML in stream at
> >>> >> > line
> >>> >> > 1,
> >>> >> > column 0, byte index 0: syntax error
> >>> >> >
> >>> >> >
> >>> >> >
> >>> >> > Root does not exist. Either state file could not be opened or it
> >>> >> > does
> >>> >> > not
> >>> >> > contain valid xml
> >>> >> >
> >>> >> >
> >>> >> > If I save my pipeline state as .pvsm file, I can re-open it
> >>> >> > correctly
> >>> >> > and I
> >>> >> > am just having this problem with .py state files.
> >>> >> >
> >>> >> > Does anybody know how I could fix this problem?
> >>> >> >
> >>> >> > Thanks in Advance,
> >>> >> >
> >>> >> >
> >>> >> > _______________________________________________
> >>> >> > Powered by www.kitware.com
> >>> >> >
> >>> >> > Visit other Kitware open-source projects at
> >>> >> > http://www.kitware.com/opensource/opensource.html
> >>> >> >
> >>> >> > Please keep messages on-topic and check the ParaView Wiki at:
> >>> >> > http://paraview.org/Wiki/ParaView
> >>> >> >
> >>> >> > Follow this link to subscribe/unsubscribe:
> >>> >> > http://www.paraview.org/mailman/listinfo/paraview
> >>> >> >
> >>> >
> >>> >
> >>
> >>
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20131031/d8c30b16/attachment-0001.htm>


More information about the ParaView mailing list