<div>Hi Seb,</div><div> I found the point which cause the "OpenDataFile" error: when I executed < <span style="line-height: 1.5;">paraview.Connect("172.168.0.47", 11111);</span><span style="line-height: 1.5;"> >, the view died. </span></div><div><span style="line-height: 1.5;">But I still don't know How to fix it.</span></div><div><span style="line-height: 1.5;"><br></span></div><div><span style="line-height: 1.5;"> Here is all my code:</span></div><div><span style="line-height: 1.5;">----------------------------------------------------</span></div><div><div><script type="text/javascript" language="javascript" src="/PWService/js/ParaViewWeb.js"></script></div><div><div id='container_id'></div></div><div><script></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>serverUrl = "<%=request.getScheme()%>://<%=request.getServerName()%>:<%=request.getServerPort()%>/PWService"; </div><div><span class="Apple-tab-span" style="white-space:pre"> </span>paraview = new Paraview(serverUrl);</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>paraview.createSession("Session", "vispurpose", "default");</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>myview = paraview.CreateIfNeededRenderView();</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>var reader;</div><div><br></div><div> <span class="Apple-tab-span" style="white-space:pre"> </span>paraview.Connect("172.168.0.47<span id="_editor_bookmark_start_3" style="display: none; line-height: 0px;"></span>", 11111); // !!! delete this line, the code will be work!</div><div><span class="Apple-tab-span" style="white-space:pre"> </span></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>val ="/home/tiandong/bluntfin.vts";</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>reader = paraview.OpenDataFile(val);</div><div><span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="line-height: 1.5; white-space: pre;"> </span></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>dp = paraview.Show();</div><div> paraview.Render();</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>renderers_java = new HttpAppletRenderer("javaRenderer", serverUrl);</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>renderers_java.init(paraview.sessionId, myview.__selfid__);</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>renderers_java.setSize(600 , 600);</div><div> <span class="Apple-tab-span" style="white-space:pre"> </span>renderers_java.bindToElementId('container_id');</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>renderers_java.start();</div><div></script> <span id="_editor_bookmark_start_2" style="display: none; line-height: 0px;"></span></div></div><div>----------------------------------------------------<span id="_editor_bookmark_start_1" style="display: none; line-height: 0px;"></span></div><div><br></div><div> the pvserver is connected, server shows:</div><div>----------------------------------------------------</div><div><div>$ ./pvserver </div><div>Waiting for client...</div><div>Connection URL: cs://vis.sccas.cn:11111</div><div>Accepting connection(s): vis.sccas.cn:11111</div><div>Client connected.<span id="_editor_bookmark_start_4" style="display: none; line-height: 0px;"></span></div></div><div>-----------------------------------------------------</div><div><br></div><div><div style="color:#909090;font-family:Arial Narrow;font-size:12px">------------------</div><div style="font-size:14px;font-family:Verdana;color:#000;"><div style="font-family: Simsun; font-size: medium; line-height: normal;"><span style="">------------------</span><span style="">------------------</span><span style="">--</span></div><div style="font-family: Simsun; font-size: medium; line-height: normal;"><span style="line-height: 18px;"><font face="黑体" color="#999999"><b><a href="http://baike.baidu.com/view/350205.htm#sub9836231">Ewin.TD</a></b></font></span></div><div style="font-family: Simsun; font-size: medium; line-height: normal;"><div style="line-height: 21px;"><span style="line-height: 1.5; font-family: 'Arial Narrow'; font-size: 12px;">------------------ -----------------</span></div><div style="line-height: 21px;"><span style="line-height: 1.5; background-color: rgb(239, 239, 239); font-size: 12px; font-family: Verdana;">"Sebastien Jourdain";<sebastien.jourdain@kitware.com>;</span></div><div style="line-height: 21px;"><span style="line-height: 1.5; background-color: rgb(239, 239, 239); font-size: 12px; font-family: Verdana;">"Ewin"<tiandong@fingergo.com>;</span></div><div style="line-height: 21px;"><span style="line-height: 1.5; background-color: rgb(239, 239, 239); font-size: 12px; font-family: Verdana;">"paraview"<paraview@paraview.org>;</span></div><div style="line-height: 21px;"><span style="line-height: 1.5; background-color: rgb(239, 239, 239); font-size: 12px; font-family: Verdana;">Re: [Paraview] Open remote file Error via Paraviewweb (Paraview3.98.0)</span></div></div></div></div><div><div><br></div><div dir="ltr">Hi Ewin,<div><br></div><div>this version of ParaViewWeb is so old, that I don't remember it on top of my head.</div><div><br></div><div>I will guess that the view was not properly created. (myview) hence the NoneType.</div>
<div>Moreover, you will have an issue with "wirefire" which should be "Wireframe" I believe.</div><div><br></div><div>Seb</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jun 26, 2014 at 4:03 AM, Ewin <span dir="ltr"><<a href="mailto:tiandong@fingergo.com" target="_blank">tiandong@fingergo.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>Hi all,</div><div> I want to show paraview result on webpage, and I setup the paraviewweb envi (version 3.98.0). </div>
<div> Method "paraview.loadData" can get a normal source object and show well, but it can only open native file. So, I use "paraview.OpenDataFile" to read the remote file, but I got an Error:</div>
<div> </div><div> <font color="#ff0000"> 'NoneType' object has no attribute 'Representations'</font><span style="line-height:0px"></span></div><div><font color="#ff0000"> </font></div><div><font color="#ff0000"> </font>My Code:</div>
<div> <font color="#ff0000">paraview = new Paraview(serverUrl);<span style="line-height:0px"></span></font></div><div><font color="#ff0000"> ......</font></div><div><font color="#ff0000"> var reader = paraview.OpenDataFile(val);<span style="line-height:0px"></span></font></div>
<div><font color="#ff0000"> <span style="line-height:1.5">paraview.SetDisplayProperties( {</span></font></div><div><font color="#ff0000"><span style="white-space:pre-wrap"> </span>'proxy' : reader <span style="line-height:0px"></span>,</font></div>
<div><font color="#ff0000"><span style="white-space:pre-wrap"> </span> 'view' : myview,</font></div><div><font color="#ff0000"><span style="white-space:pre-wrap"> </span>Representation : 'wirefire<span style="line-height:0px"></span>'</font></div>
<div><font color="#ff0000"><span style="white-space:pre-wrap"> </span> } );</font><span style="line-height:0px"></span></div><div><br></div><div>Any help will be appreciated!</div><div>Thanks all!</div><div><div style="color:#909090;font-family:Arial Narrow;font-size:12px">
------------------</div><div style="font-size:14px;font-family:Verdana;color:#000"><div style="font-family:Simsun;font-size:medium;line-height:normal"><span>------------------</span><span>------------------</span><span>--</span></div>
<div style="font-family:Simsun;font-size:medium;line-height:normal"><span style="line-height:18px"><font face="黑体" color="#999999"><b><a href="http://baike.baidu.com/view/350205.htm#sub9836231" target="_blank">Ewin.TD</a></b></font></span></div>
<div style="font-family:Simsun;font-size:medium;line-height:normal"><div style="line-height:21px"><br></div></div></div></div><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 <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://public.kitware.com/mailman/listinfo/paraview" target="_blank">http://public.kitware.com/mailman/listinfo/paraview</a><br>
<br></blockquote></div><br></div></div>