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