<div dir="ltr">Dear Casey,<div><br></div><div>After some fiddling around, I've found a solution! After replacing the : with _'s, the problem that remained was with the vtksmwriter not supporting .vtp in paraview 4.1. In paraview 3.98.1 the script ran without problems. Using .vtk files in paraview 4.1 seems to work however.</div>
<div>Finally, importing the .zip in kiwiviewer resulted in an error, due to the entire folder being in the "filename" description in the .kiwi file, rather than just: data/filename.vtp</div><div><br></div><div>Changing </div>
<div><p style="margin:0px">        outFile = writeToFile(extractSurface, outFile)</p><p style="margin:0px">to</p><p style="margin:0px">        outfile = os.path.join(outDir, getSourceName(source) + '.vtk')<br>        writeToFile(extractSurface, outFile)</p>

<p style="margin:0px"><br></p><p style="margin:0px">Fixed that issue as well. Thanks for your help on getting things working. Attached is the resulting macro.</p><p style="margin:0px"><br></p><p style="margin:0px">Kind regards, Roelant</p>
<div><div class="gmail_extra">​<br><div class="gmail_chip gmail_drive_chip" style="width:396px;height:18px;max-height:18px;background-color:#f5f5f5;padding:5px;color:#222;font-family:arial;font-style:normal;font-weight:bold;font-size:13px;border:1px solid #ddd">
<a href="https://docs.google.com/file/d/0BwRZactCvGP9VVBBb1hMeWhZQkU/edit?usp=drive_web" target="_blank" style="display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-decoration:none;padding:1px 0px;border:none;width:100%"><img style="vertical-align: bottom; border: none;" src="https://ssl.gstatic.com/docs/doclist/images/icon_10_generic_list.png"> <span dir="ltr" style="color:#15c;text-decoration:none;vertical-align:bottom">final_pv2kiwi.py</span></a></div>
​<br><br><div class="gmail_quote">2014-05-20 20:54 GMT+02:00 Casey Goodlett <span dir="ltr"><<a href="mailto:casey.goodlett@kitware.com" target="_blank">casey.goodlett@kitware.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr">its possible .  Can you try a different path and see if it works?<br><br>Thanks<br></div><div class=""><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, May 20, 2014 at 6:41 AM, Roel Eijg <span dir="ltr"><<a href="mailto:roelantspam@gmail.com" target="_blank">roelantspam@gmail.com</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Thanks for your help! This is all it shows, I realized however, there is a dot (.) in my windows username... perhaps that causes an issue in determining the extension?:<div>


<br></div><div><p style="margin:0px">
<span style="font-family:Courier;font-size:8.25pt;color:rgb(0,150,0)">exporting to C:\Users\r.eijgelaar/Desktop\PVExport-2014-05-20T12_35_05</span></p>
<p style="margin:0px"><span style="font-family:Courier;font-size:8.25pt;color:rgb(0,150,0)">writing source <paraview.servermanager.STLReader object at 0x0000000015D13B00>: C:\Users\r.eijgelaar/Desktop\PVExport-2014-05-20T12_35_05\data\STL_LiverRSE.vtp</span></p>


<div>

<p style="margin:0px"><span style="font-family:Courier;font-size:8.25pt;color:rgb(255,0,0)">Traceback (most recent call last):</span></p>
<p style="margin:0px"><span style="font-family:Courier;font-size:8.25pt;color:rgb(255,0,0)">  File "<string>", line 202, in <module></span></p>
<p style="margin:0px"><span style="font-family:Courier;font-size:8.25pt;color:rgb(255,0,0)">  File "<string>", line 192, in exportToDesktop</span></p>
<p style="margin:0px"><span style="font-family:Courier;font-size:8.25pt;color:rgb(255,0,0)">  File "<string>", line 179, in exportInDirectory</span></p>
<p style="margin:0px"><span style="font-family:Courier;font-size:8.25pt;color:rgb(255,0,0)">  File "<string>", line 135, in exportViewToDirectory</span></p>
<p style="margin:0px"><span style="font-family:Courier;font-size:8.25pt;color:rgb(255,0,0)">  File "<string>", line 93, in exportRepresentation</span></p>
<p style="margin:0px"><span style="font-family:Courier;font-size:8.25pt;color:rgb(255,0,0)">  File "<string>", line 73, in writeSource</span></p>
<p style="margin:0px"><span style="font-family:Courier;font-size:8.25pt;color:rgb(255,0,0)">  File "<string>", line 43, in writeToFile</span></p>
<p style="margin:0px"><span style="font-family:Courier;font-size:8.25pt;color:rgb(255,0,0)">AttributeError: 'NoneType' object has no attribute 'UpdatePipeline'</span></p><p style="margin:0px"><span style="font-family:Courier;font-size:8.25pt;color:rgb(255,0,0)"><br>



</span></p><p style="margin:0px"><span style="font-family:Courier;font-size:8.25pt;color:rgb(255,0,0)"><br></span></p></div><div><p style="margin:0px"><span style="font-family:Courier;font-size:8.25pt;color:rgb(128,0,0)">ERROR: In C:\DBD\pvs-x64\paraview\src\paraview\ParaViewCore\ServerManager\Core\vtkSMWriterFactory.cxx, line 314</span></p>



<p style="margin:0px">
</p></div><p style="margin:0px"><span style="font-family:Courier;font-size:8.25pt;color:rgb(128,0,0)">vtkSMWriterFactory (00000000088EA4C0): No matching writer found for extension: vtp</span></p></div><div class="gmail_extra">



<br><br><div class="gmail_quote">2014-05-19 16:08 GMT+02:00 Casey Goodlett <span dir="ltr"><<a href="mailto:casey.goodlett@kitware.com" target="_blank">casey.goodlett@kitware.com</a>></span>:<div><div><br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr"><div>Not sure why that would be. Does it print a line like?<br><br></div>writing source NAME: FILENAME<br><br>Can you paste the filename here?<br></div><div><div><div class="gmail_extra">
<br><br><div class="gmail_quote">

On Mon, May 19, 2014 at 9:27 AM, Roel Eijg <span dir="ltr"><<a href="mailto:roelantspam@gmail.com" target="_blank">roelantspam@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">





<div dir="ltr">Thanks Casey, this seems to get the script a step further, folders get created but they are still empty. I get the following output message and log in the python shell:<div><br><p style="margin:0px"><span style="font-family:Courier;font-size:8.25pt;color:rgb(128,0,0)">ERROR: In C:\DBD\pvs-x64\paraview\src\paraview\ParaViewCore\ServerManager\Core\vtkSMWriterFactory.cxx, line 314</span></p>







<div><span style="color:rgb(128,0,0);font-family:Courier;font-size:8.25pt">vtkSMWriterFactory (000000000876A4C0): No matching writer found for extension: vtp</span> <br><div><br></div><div><div><p style="margin:0px">

<span style="font-family:Courier;font-size:8.25pt;color:rgb(255,0,0)">Traceback (most recent call last):</span></p>

<p style="margin:0px"><span style="font-family:Courier;font-size:8.25pt;color:rgb(255,0,0)">  File "<string>", line 202, in <module></span></p>
<p style="margin:0px"><span style="font-family:Courier;font-size:8.25pt;color:rgb(255,0,0)">  File "<string>", line 192, in exportToDesktop</span></p>
<p style="margin:0px"><span style="font-family:Courier;font-size:8.25pt;color:rgb(255,0,0)">  File "<string>", line 179, in exportInDirectory</span></p>
</div><p style="margin:0px"><span style="font-family:Courier;font-size:8.25pt;color:rgb(255,0,0)">  File "<string>", line 135, in exportViewToDirectory</span></p>
<p style="margin:0px"><span style="font-family:Courier;font-size:8.25pt;color:rgb(255,0,0)">  File "<string>", line 93, in exportRepresentation</span></p>
<p style="margin:0px"><span style="font-family:Courier;font-size:8.25pt;color:rgb(255,0,0)">  File "<string>", line 73, in writeSource</span></p>
<p style="margin:0px"><span style="font-family:Courier;font-size:8.25pt;color:rgb(255,0,0)">  File "<string>", line 43, in writeToFile</span></p>
<p style="margin:0px"><span style="font-family:Courier;font-size:8.25pt;color:rgb(255,0,0)">AttributeError: 'NoneType' object has no attribute 'UpdatePipeline'</span></p></div></div></div></div><div class="gmail_extra">






<br><br><div class="gmail_quote">2014-05-19 15:07 GMT+02:00 Casey Goodlett <span dir="ltr"><<a href="mailto:casey.goodlett@kitware.com" target="_blank">casey.goodlett@kitware.com</a>></span>:<div><div><br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr"><div>You could try changing line170 of the script from<br><br>timestamp = datetime.datetime.now().replace(microsecond=0).isoformat()<br><br></div>to<br><br>timestamp = datetime.datetime.now().replace(microsecond=0).isoformat().replace(':','_')<br>








</div><div><div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, May 19, 2014 at 8:57 AM, Casey Goodlett <span dir="ltr"><<a href="mailto:casey.goodlett@kitware.com" target="_blank">casey.goodlett@kitware.com</a>></span> wrote:<br>








<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div>Roel,<br><br></div>Mixed backward and forward slashes should be fine.  I think its more likely the timestamp putting a colon in the filename.<br>








</div><div class="gmail_extra"><br><br><div class="gmail_quote"><div><div>
On Mon, May 19, 2014 at 6:37 AM, Roel Eijg <span dir="ltr"><<a href="mailto:roelantspam@gmail.com" target="_blank">roelantspam@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">








<div><div>
<div dir="ltr">Dear community,<div><br></div><div>First off, I love kiwi-viewer, thanks! </div><div>I'm having a problem with exporting paraview-scene's using the paraview_to_kiwi.py macro on Windows 7. On the Mac this script worked like a charm, but on windows I get the following error:</div>










<div><br></div><div><p style="margin:0px"><span style="font-family:Courier;font-size:8.25pt;color:rgb(255,0,0)">Traceback (most recent call last):</span></p>
<p style="margin:0px"><span style="font-family:Courier;font-size:8.25pt;color:rgb(255,0,0)">  File "<string>", line 202, in <module></span></p>
<p style="margin:0px"><span style="font-family:Courier;font-size:8.25pt;color:rgb(255,0,0)">  File "<string>", line 192, in exportToDesktop</span></p>
<p style="margin:0px"><span style="font-family:Courier;font-size:8.25pt;color:rgb(255,0,0)">  File "<string>", line 179, in exportInDirectory</span></p>
<p style="margin:0px"><span style="font-family:Courier;font-size:8.25pt;color:rgb(255,0,0)">  File "<string>", line 112, in exportViewToDirectory</span></p>
<p style="margin:0px"><span style="font-family:Courier;font-size:8.25pt;color:rgb(255,0,0)">  File "C:\Program Files (x86)\ParaView 4.1.0\bin\lib\os.py", line 150, in makedirs</span></p>
<p style="margin:0px"><span style="font-family:Courier;font-size:8.25pt;color:rgb(255,0,0)">    makedirs(head, mode)</span></p>
<p style="margin:0px"><span style="font-family:Courier;font-size:8.25pt;color:rgb(255,0,0)">  File "C:\Program Files (x86)\ParaView 4.1.0\bin\lib\os.py", line 157, in makedirs</span></p>
<p style="margin:0px"><span style="font-family:Courier;font-size:8.25pt;color:rgb(255,0,0)">    mkdir(name, mode)</span></p>
<p style="margin:0px"><span style="font-family:Courier;font-size:8.25pt;color:rgb(255,0,0)">WindowsError: [Error 123] The filename, directory name, or volume label syntax is incorrect: 'C:\\Users\\username/Desktop\\PVExport-2014-05-19T12:29:55'</span></p>










<p style="margin:0px"><span style="font-family:Courier;font-size:8.25pt;color:rgb(255,0,0)"><br></span></p><p style="margin:0px">I would say it's an issue with back/forward- slashes, but my python knowledge is insufficient to resolve the issue. Could someone please take a look at it?</p>










<p style="margin:0px"><br></p><p style="margin:0px">Kind regards, Roelant</p></div></div>
<br></div></div>_______________________________________________<br>
Kiwiviewer mailing list<br>
<a href="mailto:Kiwiviewer@public.kitware.com" target="_blank">Kiwiviewer@public.kitware.com</a><br>
<a href="http://public.kitware.com/cgi-bin/mailman/listinfo/kiwiviewer" target="_blank">http://public.kitware.com/cgi-bin/mailman/listinfo/kiwiviewer</a><br>
<br></blockquote></div><span><font color="#888888"><br><br clear="all"><br>-- <br><div dir="ltr">Casey B. Goodlett, Ph.D.<br>Technical Leader<br>Kitware, Inc. - North Carolina Office<br><a href="http://www.kitware.com" target="_blank">http://www.kitware.com</a><br>









<a href="tel:%28919%29%20969-6990%20x310" value="+19199696990" target="_blank">(919) 969-6990 x310</a></div>
</font></span></div>
</blockquote></div><br><br clear="all"><br>-- <br><div dir="ltr">Casey B. Goodlett, Ph.D.<br>Technical Leader<br>Kitware, Inc. - North Carolina Office<br><a href="http://www.kitware.com" target="_blank">http://www.kitware.com</a><br>








<a href="tel:%28919%29%20969-6990%20x310" value="+19199696990" target="_blank">(919) 969-6990 x310</a></div>
</div>
</div></div></blockquote></div></div></div><br></div>
</blockquote></div><br><br clear="all"><br>-- <br><div dir="ltr">Casey B. Goodlett, Ph.D.<br>Technical Leader<br>Kitware, Inc. - North Carolina Office<br><a href="http://www.kitware.com" target="_blank">http://www.kitware.com</a><br>





<a href="tel:%28919%29%20969-6990%20x310" value="+19199696990" target="_blank">(919) 969-6990 x310</a></div>
</div>
</div></div></blockquote></div></div></div><br></div></div>
</blockquote></div><br><br clear="all"><br>-- <br><div dir="ltr">Casey B. Goodlett, Ph.D.<br>Technical Leader<br>Kitware, Inc. - North Carolina Office<br><a href="http://www.kitware.com" target="_blank">http://www.kitware.com</a><br>


<a href="tel:%28919%29%20969-6990%20x310" value="+19199696990" target="_blank">(919) 969-6990 x310</a></div>
</div>
</div></div></blockquote></div> </div></div></div></div>