Thank you very much, Seb.
Following your instructions, I resolved it!
------------------
You can not do anything before connecting.As when you connect, the created
proxy will be deleted.
The creating of the view need to happen after your Connect() call.
Seb
On Fri, Jun 27, 2014 at 1:07 AM, Ewin <[email protected]> wrote:
Hi Seb,
I found the point which cause the "OpenDataFile" error: when I executed <
paraview.Connect("172.168.0.47", 11111); >, the view died.
But I still don't know How to fix it.
Here is all my code:
----------------------------------------------------
<script type="text/javascript" language="javascript"
src="/PWService/js/ParaViewWeb.js"></script>
<div id='container_id'></div>
<script>
serverUrl =
"<%=request.getScheme()%>://<%=request.getServerName()%>:<%=request.getServerPort()%>/PWService";
paraview = new Paraview(serverUrl);
paraview.createSession("Session", "vispurpose", "default");
myview = paraview.CreateIfNeededRenderView();
var reader;
paraview.Connect("172.168.0.47", 11111); // !!! delete this line, the
code will be work!
val ="/home/tiandong/bluntfin.vts";
reader = paraview.OpenDataFile(val);
dp = paraview.Show();
paraview.Render();
renderers_java = new HttpAppletRenderer("javaRenderer", serverUrl);
renderers_java.init(paraview.sessionId, myview.__selfid__);
renderers_java.setSize(600 , 600);
renderers_java.bindToElementId('container_id');
renderers_java.start();
</script>
----------------------------------------------------
the pvserver is connected, server shows:
----------------------------------------------------
$ ./pvserver
Waiting for client...
Connection URL: cs://vis.sccas.cn:11111
Accepting connection(s): vis.sccas.cn:11111
Client connected.
-----------------------------------------------------
------------------
--------------------------------------
Ewin.TD
------------------ -----------------
"Sebastien Jourdain";<[email protected]>;
"Ewin"<[email protected]>;
"paraview"<[email protected]>;
Re: [Paraview] Open remote file Error via Paraviewweb (Paraview3.98.0)
Hi Ewin,
this version of ParaViewWeb is so old, that I don't remember it on top of my
head.
I will guess that the view was not properly created. (myview) hence the
NoneType.
Moreover, you will have an issue with "wirefire" which should be "Wireframe" I
believe.
Seb
On Thu, Jun 26, 2014 at 4:03 AM, Ewin <[email protected]> wrote:
Hi all,
I want to show paraview result on webpage, and I setup the paraviewweb
envi (version 3.98.0).
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:
'NoneType' object has no attribute 'Representations'
My Code:
paraview = new Paraview(serverUrl);
......
var reader = paraview.OpenDataFile(val);
paraview.SetDisplayProperties( {
'proxy' : reader ,
'view' : myview,
Representation : 'wirefire'
} );
Any help will be appreciated!
Thanks all!
------------------
--------------------------------------
Ewin.TD
_______________________________________________
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://public.kitware.com/mailman/listinfo/paraview_______________________________________________
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://public.kitware.com/mailman/listinfo/paraview