<div dir="ltr">Thanks Martin,<div><br></div><div>The way we fixed that issue was by adding that line:</div><div><br></div><div><a href="https://github.com/Kitware/ParaView/blob/master/Web/Python/paraview/web/protocols.py#L2287">https://github.com/Kitware/ParaView/blob/master/Web/Python/paraview/web/protocols.py#L2287</a><br></div><div><br></div><div>Can you check if that solve the problem on your end?</div><div><br></div><div>Seb</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Apr 14, 2017 at 4:59 AM, Martin Rehr <span dir="ltr"><<a href="mailto:rehr@nbi.ku.dk" target="_blank">rehr@nbi.ku.dk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Greetings,<br>
<br>
I have trouble getting a list of directory entries through the ParaviewWeb Visualizer.<br>
<br>
The ParaviewWeb Visualizer utilizes the ParaView source file: 'Web/Python2/paraview/web/<wbr>protocols.py’<br>
<br>
I have isolated the python code causing trouble and made a simple test:<br>
<br>
------------------------------<wbr>------------------------------<wbr>--<br>
from paraview import simple<br>
<br>
pxm = simple.servermanager.<wbr>ProxyManager()<br>
directory_proxy = pxm.NewProxy('misc', 'ListDirectory’)<br>
directory_proxy.List(path)<br>
file_list = directory_proxy.GetProperty('<wbr>FileList’)<br>
print "file_list.<wbr>GetNumberOfElements(): %s" % file_list.GetNumberOfElements(<wbr>)<br>
------------------------------<wbr>------------------------------<wbr>--<br>
<br>
‘file_list' remain empty no matter how many files located in ‘path’<br>
<br>
I have tracked the problem down to that ‘vtkSIDirectoryProxy::Pull'[1] is never called and therefore the 'FileList' and ‘DirectoryList’ properties of ‘vtkSMDirectoryProxy' is never updated.<br>
This can be fixed by modifying vtkSMDirectoryProxy::List[2] to:<br>
<br>
------------------------------<wbr>------------------------------<wbr>--<br>
bool vtkSMDirectoryProxy::List(<wbr>const char* dir)<br>
{<br>
bool result = this->CallDirectoryMethod("<wbr>OpenDirectory", dir);<br>
if (result)<br>
{<br>
this-><wbr>UpdatePropertyInformation(<wbr>this->GetProperty("<wbr>DirectoryList"));<br>
this-><wbr>UpdatePropertyInformation(<wbr>this->GetProperty("FileList"))<wbr>;<br>
}<br>
return result;<br>
}<br>
------------------------------<wbr>------------------------------<wbr>--<br>
<br>
And changing ‘vtkSIDirectoryProxy::<wbr>ReadXMLProperty’[1]:<br>
------------------------------<wbr>------------------------------<wbr>--------------------<br>
if (strcmp(name.c_str(), "FileList") == 0 || strcmp(name.c_str(), "DirectoryList”))<br>
-><br>
if (strcmp(name.c_str(), "FileList") == 0 || strcmp(name.c_str(), "DirectoryList") == 0)<br>
------------------------------<wbr>------------------------------<wbr>--------------------<br>
<br>
I’m new to the ParaView code-base so I don’t know if this is the correct way to fix the above problem, any comments is appreciated.<br>
<br>
The above tests are performed on an Ubuntu 14.04 with kernel 3.13.0-112-generic #159-Ubuntu SMP and the official 5.3 source release (ParaView-v5.3.0.tar.gz) as well as the latest git checkout.<br>
<br>
Best Regards,<br>
Martin Rehr<br>
<br>
[1] ParaViewCore/<wbr>ServerImplementation/Core/<wbr>vtkSIDirectoryProxy.cxx<br>
[2] ParaViewCore/ServerManager/<wbr>Default/vtkSMDirectoryProxy.<wbr>cxx<br>
<br>
<br>
<br>
<br>
<br>______________________________<wbr>_________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/<wbr>opensource/opensource.html</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=Paraview-developers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=<wbr>Paraview-developers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/paraview-developers" rel="noreferrer" target="_blank">http://public.kitware.com/<wbr>mailman/listinfo/paraview-<wbr>developers</a><br>
<br></blockquote></div><br></div>