Thank you very much Andy,<div>with your precious help I have been able to find out a working solution for what I need.</div><div><br><div>I foud out the the original script is completly functional without any modification.... </div>
<div>the only BIG ISSUE was the the Paraview binaries provided by the Ubuntu Repositories</div><div>do not provide all the needed python scripts for the execution of a perfect python environment</div><div>in Paraview. I would like to notify this to the mantainers of the repos. </div>
<div>So, the workaround was this easy! I just installed Paraview from the latest source and got</div><div>the thing running.</div><div><br></div><div>However I found another problem relatet of course to the execution of the pipeline due to</div>
<div>the missing active source, just as you suggested in you mail. That was easier to solve.</div><div>So I ended up with a working script I want to share with all those people that may need it.</div><div>I'll send an heavily commented version with a dedicated email. Here is a snippet just to let you</div>
<div>see how i did. </div><div>Thank you very much for your time!</div><div><br></div><div>Luca</div><div><br></div><div>------------------ CODE-------------------</div><div><br></div><div><div>try: paraview.simple</div><div>
except: from paraview.simple import *</div><div>paraview.simple._DisableFirstRenderCameraReset()</div></div><div><br></div><div><div>fotobioreattore_foam = FindSource("fotobioreattore.foam")</div><div>SetActiveSource(fotobioreattore_foam)</div>
<div><br></div><div>PlotOverLine2 = PlotOverLine( Source="High Resolution Line Source" )</div><div>DataRepresentation7 = Show()</div><div><br></div><div>PlotOverLine2.Source.Point1 = [0.0, 0.0, 0.0]</div><div>PlotOverLine2.Source.Point2 = [0.0, 0.0, 0.43]</div>
<div><br></div><div>Render()</div><div><br></div><div>source = PlotOverLine2</div><div>writer = CreateWriter("YOUR_FILE_NAME_GOES_HERE.csv", source)</div><div>writer.FieldAssociation = "Points" # or "Cells"</div>
<div>writer.UpdatePipeline()</div><div>del writer</div></div><div><br></div><div>-------------------------------------------</div><div><br><div class="gmail_quote">2011/9/30 Andy Bauer <span dir="ltr"><<a href="mailto:andy.bauer@kitware.com">andy.bauer@kitware.com</a>></span><br>
<blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; position: static; z-index: auto; ">
I think the first problem is that there isn't an active source. The GetActiveSource() is returning None and when you create subsequent filters that automatically connect to the active source it causes problems when you try to execute the pipeline. Something along the lines of below should get you closer:<br>
=========<div class="im"><br>try: paraview.simple<br>except: from paraview.simple import *<br>paraview.simple._DisableFirstRenderCameraReset()<br><br></div>Wavelet()<br>p = PlotOverLine()<br>p.Source.Point1 = [-.5, -5., -5.]<br>
p.Source.Point2 = [.5, 5., 5.]<br>
w = CSVWriter()<br>w.FileName = "/home/piota/csv.csv"<br>w.UpdatePipeline()<br>=========<br><br>The problem here is that the output of PlotOverLine is a polydata and the writer is expecting a vtkTable. I'm not sure how to convert between the two. Maybe someone else can help you with that.<br>
<br>The 2 things I'd try at this point are either creating my own writer using the python programmable filter or writing out a polydata file and parsing that for the information that you need. The first one is probably the better choice of the two. <br>
<font color="#888888">
<br>Andy</font><div><div></div><div class="h5"><br><br><br><div class="gmail_quote">On Fri, Sep 30, 2011 at 12:47 AM, Luca Giannelli <span dir="ltr"><<a href="mailto:bilogo@gmail.com" target="_blank">bilogo@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin-top: 0pt; margin-right: 0pt; margin-bottom: 0pt; margin-left: 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex; position: static; z-index: auto; ">
Ok, <div><br></div><div>I moved on a little..... Reading the output of the error reported in the previous mail, it says that it cannot find "<span style="color:rgb(255, 0, 0);font-family:Courier;font-size:12px">XArrayName</span>". Looking the original script you can see that it is needed for the definition of the plot area properties in the GUI.... I don't need it as I only want a csv file, so I commented out everything in that section. Running the script again it now complains about being unable to find "<span style="color:rgb(255, 0, 0);font-family:Courier;font-size:12px;white-space:pre-wrap">CreateWriter</span>". I need this to write the csv file so this error becomes fatal. </div>
<div>As this function should be included in the paraview.simple that I load at the beginning of the script (like explained in the manual), what I did was to go through all the functions in the simple.py file to locate it. Without any succes..... Then I went on with the brute-force approach and lauched:</div>
<div><br></div><div>grep -H -r "CreateWriter" /usr</div><div><br></div><div>
<p style="margin:0px;text-indent:0px"><font face="Courier"><span style="font-size:12px">Binary file /usr/lib/paraview/libvtkPVFilters.so matches</span></font></p>
<p style="margin:0px;text-indent:0px"><font face="Courier"><span style="font-size:12px">B</span></font><span style="font-family:Courier;font-size:12px">inary file /usr/lib/paraview/libvtkPVServerManager.so matches</span></p>
<p style="margin:0px;text-indent:0px"><span style="font-family:Courier;font-size:12px"></span><span style="font-family:Courier;font-size:12px">Binary file /usr/lib/paraview/libvtkIO.so.pv3.8 matches</span></p>
<p style="margin:0px;text-indent:0px"><span style="font-family:Courier;font-size:12px"></span><span style="font-family:Courier;font-size:12px">Binary file /usr/lib/paraview/libvtkPVServerManagerPythonD.so matches</span></p>
<p style="margin:0px;text-indent:0px"><span style="font-family:Courier;font-size:12px">Binary file /usr/lib/paraview/libpqApplicationComponents.so matches</span></p>
<p style="margin:0px;text-indent:0px"><span style="font-family:Courier;font-size:12px"></span><span style="font-family:Courier;font-size:12px">Binary file /usr/lib/paraview/libvtkIO.so matches</span></p>
<p style="margin:0px;text-indent:0px"><span style="font-family:Courier;font-size:12px"><br></span></p><p style="margin:0px">
Unfortunately they are all bin files and not py...</p><p style="margin:0px">I'm starting to believe that I'm really missing something here.....</p><p style="margin:0px">
Any idea?</p><p style="margin:0px"><br></p><p style="margin:0px">Thx!!!</p><p style="margin:0px">
<br></p><font color="#888888"><p style="margin:0px">Luca</p><p style="margin:0px"><br></p><p style="margin:0px;text-indent:0px">
<font color="#ff0000" face="Courier"></font></p></font></div><div><div></div><div><div><div class="gmail_quote">2011/9/30 Luca Giannelli <span dir="ltr"><<a href="mailto:bilogo@gmail.com" target="_blank">bilogo@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">
<div>Andy,</div><div><br></div>thank you for your quick reply.<div><br>I am using Paraview 3.8.0 which is the latest binary in the Ubuntu repos. I chose to install that without compiling from source as I was rushing (I know, it sounds weird... but). Do you believe that the problem is build-related?</div>
<div><br></div><div>However, reading the errors that you get I don't see anything that I can visualize in my output which is as follows (Python shell)</div><div><br></div><div><div>
<p style="margin:0px;text-indent:0px"><span style="font-family:'Courier';font-size:9pt;color:rgb(255, 0, 0)">Traceback (most recent call last):</span></p>
</div><p style="margin:0px;text-indent:0px"><span style="font-family:'Courier';font-size:9pt;color:rgb(255, 0, 0)"> File "/usr/lib/paraview/site-packages/paraview/servermanager.py", line 2922, in _proxyDefinitionsUpdated</span></p>
<p style="margin:0px;text-indent:0px"><span style="font-family:'Courier';font-size:9pt;color:rgb(255, 0, 0)"> if vtkSMObject.GetProxyManager().GetProxyDefinitionsUpdated():</span></p>
<p style="margin:0px;text-indent:0px"><span style="font-family:'Courier';font-size:9pt;color:rgb(255, 0, 0)">AttributeError: GetProxyDefinitionsUpdated</span></p><div>
<p style="margin:0px;text-indent:0px"><span style="font-family:'Courier';font-size:9pt;color:rgb(255, 0, 0)">Traceback (most recent call last):</span></p>
</div><p style="margin:0px;text-indent:0px"><span style="font-family:'Courier';font-size:9pt;color:rgb(255, 0, 0)"> File "/usr/lib/paraview/site-packages/paraview/servermanager.py", line 2922, in _proxyDefinitionsUpdated</span></p>
<p style="margin:0px;text-indent:0px"><span style="font-family:'Courier';font-size:9pt;color:rgb(255, 0, 0)"> if vtkSMObject.GetProxyManager().GetProxyDefinitionsUpdated():</span></p>
<p style="margin:0px;text-indent:0px"><span style="font-family:'Courier';font-size:9pt;color:rgb(255, 0, 0)">AttributeError: GetProxyDefinitionsUpdated</span></p><div>
<p style="margin:0px;text-indent:0px"><span style="font-family:'Courier';font-size:9pt;color:rgb(255, 0, 0)">Traceback (most recent call last):</span></p>
</div><p style="margin:0px;text-indent:0px"><span style="font-family:'Courier';font-size:9pt;color:rgb(255, 0, 0)"> File "/usr/lib/paraview/site-packages/paraview/servermanager.py", line 2922, in _proxyDefinitionsUpdated</span></p>
<p style="margin:0px;text-indent:0px"><span style="font-family:'Courier';font-size:9pt;color:rgb(255, 0, 0)"> if vtkSMObject.GetProxyManager().GetProxyDefinitionsUpdated():</span></p>
<p style="margin:0px;text-indent:0px"><span style="font-family:'Courier';font-size:9pt;color:rgb(255, 0, 0)">AttributeError: GetProxyDefinitionsUpdated</span></p><div>
<p style="margin:0px;text-indent:0px"><span style="font-family:'Courier';font-size:9pt;color:rgb(255, 0, 0)">Traceback (most recent call last):</span></p>
</div><p style="margin:0px;text-indent:0px"><span style="font-family:'Courier';font-size:9pt;color:rgb(255, 0, 0)"> File "/usr/lib/paraview/site-packages/paraview/servermanager.py", line 2922, in _proxyDefinitionsUpdated</span></p>
<p style="margin:0px;text-indent:0px"><span style="font-family:'Courier';font-size:9pt;color:rgb(255, 0, 0)"> if vtkSMObject.GetProxyManager().GetProxyDefinitionsUpdated():</span></p>
<p style="margin:0px;text-indent:0px"><span style="font-family:'Courier';font-size:9pt;color:rgb(255, 0, 0)">AttributeError: GetProxyDefinitionsUpdated</span></p><div>
<p style="margin:0px;text-indent:0px"><span style="font-family:'Courier';font-size:9pt;color:rgb(255, 0, 0)">Traceback (most recent call last):</span></p>
<p style="margin:0px;text-indent:0px"><span style="font-family:'Courier';font-size:9pt;color:rgb(255, 0, 0)"> File "<string>", line 17, in <module></span></p>
</div><p style="margin:0px;text-indent:0px"><span style="font-family:'Courier';font-size:9pt;color:rgb(255, 0, 0)"> File "/usr/lib/paraview/site-packages/paraview/servermanager.py", line 201, in __setattr__</span></p>
<div>
<p style="margin:0px;text-indent:0px"><span style="font-family:'Courier';font-size:9pt;color:rgb(255, 0, 0)"> "to add this attribute.")</span></p>
<p style="margin:0px;text-indent:0px"><span style="font-family:'Courier';font-size:9pt;color:rgb(255, 0, 0)">AttributeError: Attribute XArrayName does not exist. This class does not allow addition of new attributes to avoid mistakes due to typos. Use add_attribute() if you really want to add this attribute.</span></p>
<p style="margin:0px;text-indent:0px"><span style="font-family:'Courier';font-size:9pt;color:rgb(255, 0, 0)"><br></span></p></div><p style="margin:0px">
It looks like a complain about the server, not about my script though.... in fact, if comment out the writer part, leaving only the "trace" recorded set of operations, it spits out the very same error. Moreover, the Paraview output doesn't show any output at all (except for the usual a complain about the qt4 that is not related).</p>
<p style="margin:0px">Do you see any evident problem in the script syntax in the writer section? For example references to the wrong source, etc?</p><p style="margin:0px">
Or do you believe that it is a problem related to the Paraview/Python installation (or whatever..). </p><p style="margin:0px"><br></p><p style="margin:0px">
Another point.... does the "PlotOverLine2" influence the results? I recorded the trace making a second POL that automatically got labeled as #2... if I run it at startup it executes perfectly fine so I don't think that the problem is here too.</p>
<p style="margin:0px"><br></p><p style="margin:0px">I'm sorry for my pretty low level in Python as I am an absolute beginner</p>
<p style="margin:0px"><br></p><p style="margin:0px">Thanks again</p><p style="margin:0px">
<br></p><font color="#888888"><p style="margin:0px">Luca</p></font></div><div><div></div><div><div><br><div class="gmail_quote">2011/9/29 Andy Bauer <span dir="ltr"><<a href="mailto:andy.bauer@kitware.com" target="_blank">andy.bauer@kitware.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">
If you're running the python script in the paraview gui sometimes the messages are printed out to the python shell. What version of paraview are you using? <br><br>I'm running paraview from the head of the repo. The output I get from the OutputMessages window is:<br>
================<br>
<p style="margin:0px;text-indent:0px"><span style="font-family:'Courier';font-size:9pt;color:rgb(128, 0, 0)">ERROR: In /home/acbauer/CODE/ParaView/ParaView/VTK/Filtering/vtkDemandDrivenPipeline.cxx, line 727</span></p>
<p style="margin:0px;text-indent:0px"><span style="font-family:'Courier';font-size:9pt;color:rgb(128, 0, 0)">vtkPVCompositeDataPipeline (0x493bbd0): Input port 1 of algorithm vtkPProbeFilter(0x493dab0) has 0 connections but is not optional.</span></p>
<p style="margin:0px;text-indent:0px;font-family:'Courier';font-size:9pt;color:rgb(128, 0, 0)"></p>
<p style="margin:0px;text-indent:0px;font-family:'Courier';font-size:9pt;color:rgb(128, 0, 0)"></p>
<p style="margin:0px;text-indent:0px"><span style="font-family:'Courier';font-size:9pt;color:rgb(128, 0, 0)">ERROR: In /home/acbauer/CODE/ParaView/ParaView/VTK/Filtering/vtkDemandDrivenPipeline.cxx, line 727</span></p>
<p style="margin:0px;text-indent:0px"><span style="font-family:'Courier';font-size:9pt;color:rgb(128, 0, 0)">vtkPVCompositeDataPipeline (0x493bbd0): Input port 1 of algorithm vtkPProbeFilter(0x493dab0) has 0 connections but is not optional.</span></p>
<p style="margin:0px;text-indent:0px;font-family:'Courier';font-size:9pt;color:rgb(128, 0, 0)"></p>
<p style="margin:0px;text-indent:0px;font-family:'Courier';font-size:9pt;color:rgb(128, 0, 0)"></p>
<p style="margin:0px;text-indent:0px"><span style="font-family:'Courier';font-size:9pt;color:rgb(128, 0, 0)">ERROR: In /home/acbauer/CODE/ParaView/ParaView/VTK/Filtering/vtkDemandDrivenPipeline.cxx, line 727</span></p>
<p style="margin:0px;text-indent:0px"><span style="font-family:'Courier';font-size:9pt;color:rgb(128, 0, 0)">vtkPVCompositeDataPipeline (0x493bbd0): Input port 1 of algorithm vtkPProbeFilter(0x493dab0) has 0 connections but is not optional.</span></p>
<p style="margin:0px;text-indent:0px;font-family:'Courier';font-size:9pt;color:rgb(128, 0, 0)"></p>
<p style="margin:0px;text-indent:0px;font-family:'Courier';font-size:9pt;color:rgb(128, 0, 0)"></p>
<p style="margin:0px;text-indent:0px"><span style="font-family:'Courier';font-size:9pt;color:rgb(128, 0, 0)">ERROR: In /home/acbauer/CODE/ParaView/ParaView/VTK/Filtering/vtkDemandDrivenPipeline.cxx, line 727</span></p>
<p style="margin:0px;text-indent:0px"><span style="font-family:'Courier';font-size:9pt;color:rgb(128, 0, 0)">vtkPVCompositeDataPipeline (0x493bbd0): Input port 1 of algorithm vtkPProbeFilter(0x493dab0) has 0 connections but is not optional.</span></p>
<p style="margin:0px;text-indent:0px;font-family:'Courier';font-size:9pt;color:rgb(128, 0, 0)"></p>
<p style="margin:0px;text-indent:0px;font-family:'Courier';font-size:9pt;color:rgb(128, 0, 0)"></p>
<p style="margin:0px;text-indent:0px"><span style="font-family:'Courier';font-size:9pt;color:rgb(128, 0, 0)">ERROR: In /home/acbauer/CODE/ParaView/ParaView/VTK/Filtering/vtkDemandDrivenPipeline.cxx, line 727</span></p>
<p style="margin:0px;text-indent:0px"><span style="font-family:'Courier';font-size:9pt;color:rgb(128, 0, 0)">vtkPVCompositeDataPipeline (0x493bbd0): Input port 1 of algorithm vtkPProbeFilter(0x493dab0) has 0 connections but is not optional.</span></p>
<p style="margin:0px;text-indent:0px;font-family:'Courier';font-size:9pt;color:rgb(128, 0, 0)"></p>
<p style="margin:0px;text-indent:0px;font-family:'Courier';font-size:9pt;color:rgb(128, 0, 0)"></p>
<p style="margin:0px;text-indent:0px"><span style="font-family:'Courier';font-size:9pt;color:rgb(128, 0, 0)">ERROR: In /home/acbauer/CODE/ParaView/ParaView/VTK/Filtering/vtkDemandDrivenPipeline.cxx, line 727</span></p>
<p style="margin:0px;text-indent:0px"><span style="font-family:'Courier';font-size:9pt;color:rgb(128, 0, 0)">vtkPVCompositeDataPipeline (0x493bbd0): Input port 1 of algorithm vtkPProbeFilter(0x493dab0) has 0 connections but is not optional.</span></p>
<p style="margin:0px;text-indent:0px;font-family:'Courier';font-size:9pt;color:rgb(128, 0, 0)"></p>
<p style="margin:0px;text-indent:0px;font-family:'Courier';font-size:9pt;color:rgb(128, 0, 0)"></p>
<p style="margin:0px;text-indent:0px"><span style="font-family:'Courier';font-size:9pt;color:rgb(128, 0, 0)">ERROR: In /home/acbauer/CODE/ParaView/ParaView/VTK/Filtering/vtkDemandDrivenPipeline.cxx, line 727</span></p>
<p style="margin:0px;text-indent:0px"><span style="font-family:'Courier';font-size:9pt;color:rgb(128, 0, 0)">vtkPVCompositeDataPipeline (0x493bbd0): Input port 1 of algorithm vtkPProbeFilter(0x493dab0) has 0 connections but is not optional.</span></p>
<p style="margin:0px;text-indent:0px;font-family:'Courier';font-size:9pt;color:rgb(128, 0, 0)"></p>
<p style="margin:0px;text-indent:0px;font-family:'Courier';font-size:9pt;color:rgb(128, 0, 0)"></p>
<p style="margin:0px;text-indent:0px"><span style="font-family:'Courier';font-size:9pt;color:rgb(128, 0, 0)">ERROR: In /home/acbauer/CODE/ParaView/ParaView/VTK/Filtering/vtkDemandDrivenPipeline.cxx, line 727</span></p>
<p style="margin:0px;text-indent:0px"><span style="font-family:'Courier';font-size:9pt;color:rgb(128, 0, 0)">vtkPVCompositeDataPipeline (0x493bbd0): Input port 1 of algorithm vtkPProbeFilter(0x493dab0) has 0 connections but is not optional.</span></p>
<p style="margin:0px;text-indent:0px;font-family:'Courier';font-size:9pt;color:rgb(128, 0, 0)"></p>
<p style="margin:0px;text-indent:0px;font-family:'Courier';font-size:9pt;color:rgb(128, 0, 0)"></p>
<p style="margin:0px;text-indent:0px"><span style="font-family:'Courier';font-size:9pt;color:rgb(128, 0, 0)">ERROR: In /home/acbauer/CODE/ParaView/ParaView/VTK/Filtering/vtkDemandDrivenPipeline.cxx, line 727</span></p>
<p style="margin:0px;text-indent:0px"><span style="font-family:'Courier';font-size:9pt;color:rgb(128, 0, 0)">vtkPVCompositeDataPipeline (0x493bbd0): Input port 1 of algorithm vtkPProbeFilter(0x493dab0) has 0 connections but is not optional.</span></p>
<p style="margin:0px;text-indent:0px;font-family:'Courier';font-size:9pt;color:rgb(128, 0, 0)"></p>
<p style="margin:0px;text-indent:0px;font-family:'Courier';font-size:9pt;color:rgb(128, 0, 0)"></p>
<p style="margin:0px;text-indent:0px"><span style="font-family:'Courier';font-size:9pt;color:rgb(128, 0, 0)">ERROR: In /home/acbauer/CODE/ParaView/ParaView/VTK/Filtering/vtkDemandDrivenPipeline.cxx, line 727</span></p>
<p style="margin:0px;text-indent:0px"><span style="font-family:'Courier';font-size:9pt;color:rgb(128, 0, 0)">vtkPVCompositeDataPipeline (0x493bbd0): Input port 1 of algorithm vtkPProbeFilter(0x493dab0) has 0 connections but is not optional.</span></p>
<p style="margin:0px;text-indent:0px;font-family:'Courier';font-size:9pt;color:rgb(128, 0, 0)"></p>
<p style="margin:0px;text-indent:0px;font-family:'Courier';font-size:9pt;color:rgb(128, 0, 0)"></p>
<p style="margin:0px;text-indent:0px"><span style="font-family:'Courier';font-size:9pt;color:rgb(128, 0, 0)">ERROR: In /home/acbauer/CODE/ParaView/ParaView/VTK/Filtering/vtkDemandDrivenPipeline.cxx, line 727</span></p>
<p style="margin:0px;text-indent:0px"><span style="font-family:'Courier';font-size:9pt;color:rgb(128, 0, 0)">vtkPVCompositeDataPipeline (0x493bbd0): Input port 1 of algorithm vtkPProbeFilter(0x493dab0) has 0 connections but is not optional.</span></p>
<p style="margin:0px;text-indent:0px;font-family:'Courier';font-size:9pt;color:rgb(128, 0, 0)"></p>
<p style="margin:0px;text-indent:0px;font-family:'Courier';font-size:9pt;color:rgb(128, 0, 0)"></p>
<p style="margin:0px;text-indent:0px"><span style="font-family:'Courier';font-size:9pt;color:rgb(128, 0, 0)">ERROR: In /home/acbauer/CODE/ParaView/ParaView/VTK/Filtering/vtkDemandDrivenPipeline.cxx, line 727</span></p>
<p style="margin:0px;text-indent:0px"><span style="font-family:'Courier';font-size:9pt;color:rgb(128, 0, 0)">vtkPVCompositeDataPipeline (0x493bbd0): Input port 1 of algorithm vtkPProbeFilter(0x493dab0) has 0 connections but is not optional.</span></p>
<p style="margin:0px;text-indent:0px;font-family:'Courier';font-size:9pt;color:rgb(128, 0, 0)"></p>
<p style="margin:0px;text-indent:0px;font-family:'Courier';font-size:9pt;color:rgb(128, 0, 0)"></p>
<p style="margin:0px;text-indent:0px"><span style="font-family:'Courier';font-size:9pt;color:rgb(128, 0, 0)">ERROR: In /home/acbauer/CODE/ParaView/ParaView/VTK/Filtering/vtkDemandDrivenPipeline.cxx, line 727</span></p>
<p style="margin:0px;text-indent:0px"><span style="font-family:'Courier';font-size:9pt;color:rgb(128, 0, 0)">vtkPVCompositeDataPipeline (0x493bbd0): Input port 1 of algorithm vtkPProbeFilter(0x493dab0) has 0 connections but is not optional.</span></p>
<p style="margin:0px;text-indent:0px;font-family:'Courier';font-size:9pt;color:rgb(128, 0, 0)"></p>
<p style="margin:0px;text-indent:0px;font-family:'Courier';font-size:9pt;color:rgb(128, 0, 0)"></p>
<p style="margin:0px;text-indent:0px"><span style="font-family:'Courier';font-size:9pt;color:rgb(128, 0, 0)">ERROR: In /home/acbauer/CODE/ParaView/ParaView/VTK/Filtering/vtkDemandDrivenPipeline.cxx, line 727</span></p>
<p style="margin:0px;text-indent:0px"><span style="font-family:'Courier';font-size:9pt;color:rgb(128, 0, 0)">vtkPVCompositeDataPipeline (0x493bbd0): Input port 1 of algorithm vtkPProbeFilter(0x493dab0) has 0 connections but is not optional.</span></p>
<p style="margin:0px;text-indent:0px;font-family:'Courier';font-size:9pt;color:rgb(128, 0, 0)"></p>
<p style="margin:0px;text-indent:0px;font-family:'Courier';font-size:9pt;color:rgb(128, 0, 0)"></p>
<p style="margin:0px;text-indent:0px"><span style="font-family:'Courier';font-size:9pt;color:rgb(128, 0, 0)">ERROR: In /home/acbauer/CODE/ParaView/ParaView/VTK/Filtering/vtkDemandDrivenPipeline.cxx, line 727</span></p>
<p style="margin:0px;text-indent:0px"><span style="font-family:'Courier';font-size:9pt;color:rgb(128, 0, 0)">vtkPVCompositeDataPipeline (0x493bbd0): Input port 1 of algorithm vtkPProbeFilter(0x493dab0) has 0 connections but is not optional.</span></p>
<p style="margin:0px;text-indent:0px;font-family:'Courier';font-size:9pt;color:rgb(128, 0, 0)"></p>
<p style="margin:0px;text-indent:0px;font-family:'Courier';font-size:9pt;color:rgb(128, 0, 0)"></p>
<p style="margin:0px;text-indent:0px"><span style="font-family:'Courier';font-size:9pt;color:rgb(128, 0, 0)">ERROR: In /home/acbauer/CODE/ParaView/ParaView/VTK/Filtering/vtkDemandDrivenPipeline.cxx, line 727</span></p>
<p style="margin:0px;text-indent:0px"><span style="font-family:'Courier';font-size:9pt;color:rgb(128, 0, 0)">vtkPVCompositeDataPipeline (0x493bbd0): Input port 1 of algorithm vtkPProbeFilter(0x493dab0) has 0 connections but is not optional.</span></p>
<p style="margin:0px;text-indent:0px;font-family:'Courier';font-size:9pt;color:rgb(128, 0, 0)"></p>
<p style="margin:0px;text-indent:0px;font-family:'Courier';font-size:9pt;color:rgb(128, 0, 0)"></p>
<p style="margin:0px;text-indent:0px"><span style="font-family:'Courier';font-size:9pt;color:rgb(128, 0, 0)">ERROR: In /home/acbauer/CODE/ParaView/ParaView/VTK/Filtering/vtkDemandDrivenPipeline.cxx, line 727</span></p>
<p style="margin:0px;text-indent:0px"><span style="font-family:'Courier';font-size:9pt;color:rgb(128, 0, 0)">vtkPVCompositeDataPipeline (0x493bbd0): Input port 1 of algorithm vtkPProbeFilter(0x493dab0) has 0 connections but is not optional.</span></p>
<p style="margin:0px;text-indent:0px;font-family:'Courier';font-size:9pt;color:rgb(128, 0, 0)"></p>
<p style="margin:0px;text-indent:0px;font-family:'Courier';font-size:9pt;color:rgb(128, 0, 0)"></p>
<p style="margin:0px;text-indent:0px"><span style="font-family:'Courier';font-size:9pt;color:rgb(128, 0, 0)">ERROR: In /home/acbauer/CODE/ParaView/ParaView/VTK/Filtering/vtkDemandDrivenPipeline.cxx, line 727</span></p>
<p style="margin:0px;text-indent:0px"><span style="font-family:'Courier';font-size:9pt;color:rgb(128, 0, 0)">vtkPVCompositeDataPipeline (0x493bbd0): Input port 1 of algorithm vtkPProbeFilter(0x493dab0) has 0 connections but is not optional.</span></p>
<p style="margin:0px;text-indent:0px;font-family:'Courier';font-size:9pt;color:rgb(128, 0, 0)"></p>
<p style="margin:0px;text-indent:0px;font-family:'Courier';font-size:9pt;color:rgb(128, 0, 0)"></p>
<p style="margin:0px;text-indent:0px"><span style="font-family:'Courier';font-size:9pt;color:rgb(128, 0, 0)">ERROR: In /home/acbauer/CODE/ParaView/ParaView/VTK/Filtering/vtkDemandDrivenPipeline.cxx, line 727</span></p>
<p style="margin:0px;text-indent:0px"><span style="font-family:'Courier';font-size:9pt;color:rgb(128, 0, 0)">vtkPVCompositeDataPipeline (0x493bbd0): Input port 1 of algorithm vtkPProbeFilter(0x493dab0) has 0 connections but is not optional.</span></p>
<p style="margin:0px;text-indent:0px;font-family:'Courier';font-size:9pt;color:rgb(128, 0, 0)"></p>
<p style="margin:0px;text-indent:0px;font-family:'Courier';font-size:9pt;color:rgb(128, 0, 0)"></p>
<p style="margin:0px;text-indent:0px"><span style="font-family:'Courier';font-size:9pt;color:rgb(128, 0, 0)">ERROR: In /home/acbauer/CODE/ParaView/ParaView/VTK/Filtering/vtkDemandDrivenPipeline.cxx, line 727</span></p>
<p style="margin:0px;text-indent:0px"><span style="font-family:'Courier';font-size:9pt;color:rgb(128, 0, 0)">vtkPVCompositeDataPipeline (0x493bbd0): Input port 1 of algorithm vtkPProbeFilter(0x493dab0) has 0 connections but is not optional.</span></p>
<p style="margin:0px;text-indent:0px;font-family:'Courier';font-size:9pt;color:rgb(128, 0, 0)"></p>
<p style="margin:0px;text-indent:0px;font-family:'Courier';font-size:9pt;color:rgb(128, 0, 0)"></p>
<p style="margin:0px;text-indent:0px"><span style="font-family:'Courier';font-size:9pt;color:rgb(128, 0, 0)">ERROR: In /home/acbauer/CODE/ParaView/ParaView/VTK/Filtering/vtkDemandDrivenPipeline.cxx, line 727</span></p>
<p style="margin:0px;text-indent:0px"><span style="font-family:'Courier';font-size:9pt;color:rgb(128, 0, 0)">vtkPVCompositeDataPipeline (0x493bbd0): Input port 1 of algorithm vtkPProbeFilter(0x493dab0) has 0 connections but is not optional.</span></p>
<p style="margin:0px;text-indent:0px;font-family:'Courier';font-size:9pt;color:rgb(128, 0, 0)"></p>
<p style="margin:0px;text-indent:0px;font-family:'Courier';font-size:9pt;color:rgb(128, 0, 0)"></p>
<p style="margin:0px;text-indent:0px"><span style="font-family:'Courier';font-size:9pt;color:rgb(0, 0, 0)">Warning: In /home/acbauer/CODE/ParaView/ParaView/VTK/Filtering/vtkDataObject.cxx, line 920</span></p>
<p style="margin:0px;text-indent:0px"><span style="font-family:'Courier';font-size:9pt;color:rgb(0, 0, 0)">vtkMultiBlockDataSet (0x4da0e00): Attempted to ShallowCopy from null.</span></p>
<p style="margin:0px;text-indent:0px;font-family:'Courier';font-size:9pt;color:rgb(0, 0, 0)"></p>
<p style="margin:0px;text-indent:0px;font-family:'Courier';font-size:9pt;color:rgb(0, 0, 0)"></p>
<p style="margin:0px;text-indent:0px"><span style="font-family:'Courier';font-size:9pt;color:rgb(0, 0, 0)">Warning: In /home/acbauer/CODE/ParaView/ParaView/VTK/Filtering/vtkDataObject.cxx, line 920</span></p>
<p style="margin:0px;text-indent:0px"><span style="font-family:'Courier';font-size:9pt;color:rgb(0, 0, 0)">vtkMultiBlockDataSet (0x4da3af0): Attempted to ShallowCopy from null.</span></p>
<p style="margin:0px;text-indent:0px;font-family:'Courier';font-size:9pt;color:rgb(0, 0, 0)"></p>
<p style="margin:0px;text-indent:0px;font-family:'Courier';font-size:9pt;color:rgb(0, 0, 0)"></p>
<p style="margin:0px;text-indent:0px;font-family:'Courier';font-size:9pt;color:rgb(0, 0, 0)"></p>================<br><br>The output I get from the python shell is:<br>===============<br>
<p style="margin:0px;text-indent:0px"><span style="font-family:'Courier';font-size:9pt;color:rgb(255, 0, 0)">Traceback (most recent call last):</span></p>
<p style="margin:0px;text-indent:0px"><span style="font-family:'Courier';font-size:9pt;color:rgb(255, 0, 0)"> File "<string>", line 17, in <module></span></p>
<p style="margin:0px;text-indent:0px"><span style="font-family:'Courier';font-size:9pt;color:rgb(255, 0, 0)"> File "/media/ssddrive/BUILDS/ParaView/release-parallel/Utilities/VTKPythonWrapping/site-packages/paraview/servermanager.py", line 209, in __setattr__</span></p>
<p style="margin:0px;text-indent:0px"><span style="font-family:'Courier';font-size:9pt;color:rgb(255, 0, 0)"> "to add this attribute.")</span></p>
<p style="margin:0px;text-indent:0px"><span style="font-family:'Courier';font-size:9pt;color:rgb(255, 0, 0)">AttributeError: Attribute XArrayName does not exist. This class does not allow addition of new attributes to avoid mistakes due to typos. Use add_attribute() if you really want to add this attribute.</span></p>
<p style="margin:0px;text-indent:0px"><span style="font-family:'Courier';font-size:9pt;color:rgb(255, 0, 0)"><span style="color:rgb(0, 0, 0)">======================</span><br></span></p><br><div class="gmail_quote">
<div><div></div><div>
On Thu, Sep 29, 2011 at 5:57 AM, Luca Giannelli <span dir="ltr"><<a href="mailto:bilogo@gmail.com" target="_blank">bilogo@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">
<div><div></div><div>
Hello everybody,<div><br></div><div>I've been using Paraview for quite a long time but I didn't need the python scripting up to now.</div><div>I want to execute a series of plot over line in numerous points and different time steps so it is nothing</div>
<div>I can afford to do manually.</div><div>Looking on the net I was able to find out how to record a macro and how to create a writer so I</div><div>ended up with this script:</div><div><br></div><div>--------------------------------------------------------------------</div>
<div><div>try: paraview.simple</div><div>except: from paraview.simple import *</div><div>paraview.simple._DisableFirstRenderCameraReset()</div><div><br></div><div>fotobioreattore_foam = GetActiveSource()</div><div>PlotOverLine2 = PlotOverLine( Source="High Resolution Line Source" )</div>
<div><br></div><div>PlotOverLine2.Source.Point1 = [-0.035100001841783524, -0.03509980067610741, 0.0]</div><div>PlotOverLine2.Source.Point2 = [0.035100001841783524, 0.035100001841783524, 0.4300000071525574]</div><div><br>
</div>
<div>DataRepresentation7 = Show()</div><div><br></div><div>PlotOverLine2.Source.Point1 = [-0.0, 0.0, 0.0]</div><div>PlotOverLine2.Source.Point2 = [0.0, 0.0, 0.4300000071525574]</div><div><br></div><div>XYChartView4 = GetRenderView()</div>
<div>DataRepresentation7.XArrayName = 'arc_length'</div><div>DataRepresentation7.SeriesVisibility = ['U (0)', '0', 'U (1)', '0', 'U (2)', '0', 'vtkValidPointMask', '0', 'arc_length', '0', 'Points (0)', '0', 'Points (1)', '0', 'Points (2)', '0', 'Points (Magnitude)', '0']</div>
<div>DataRepresentation7.UseIndexForXAxis = 0</div><div><br></div><div>Render()</div><div><br></div><div>#= create writer</div><div>source = PlotOverLine2 #PlotOverLine2.Source</div><div>writer = CreateWriter("/home/piota/csv.csv", source)</div>
<div>#writer = CreateWriter("/home/piota/csv.csv")</div><div>writer.FieldAssociation = "Points" # or "Cells"</div><div>writer.UpdatePipeline()</div><div>del writer</div></div><div>--------------------------------------------------------------------------</div>
<div><br></div><div>If I'm not mistaken, this should write a csv.csv file in my home folder but it doesn't write anything. No error is reported when I run the script but still I get no output.</div><div>I'm still a bit confused on which source I should specify, so I'm pretty sure that the writer part is incorrect.</div>
<div><br></div><div>Can somebody help me filling it out properly?</div><div><br></div><div>Thx in advance.</div><div><br></div><font color="#888888"><div>Luca</div>
</font><br></div></div>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <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: <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></blockquote></div><br>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br>
</div></div></blockquote></div><br></div></div>