<div dir="ltr">There appears to be one more missing piece, though, because my attempt provokes an assertion error that appears to be claiming that my protocol, derived from a LinkProtocol, is not actually a LinkProtocol:<div><br></div><div>
<span></span>
<p class="gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:Courier;color:rgb(77,47,45);background-color:rgb(223,219,195)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="gmail-Apple-converted-space"> </span>File "pvsvn.py", line 41, in initialize</span></p>
<p class="gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:Courier;color:rgb(77,47,45);background-color:rgb(223,219,195)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="gmail-Apple-converted-space"> </span>self.registerVtkWebProtocol(self.testbutton())</span></p>
<p class="gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:Courier;color:rgb(77,47,45);background-color:rgb(223,219,195)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="gmail-Apple-converted-space"> </span>File "/Applications/ParaView-5.4.1-1232-g1496380e37.app/Contents/Python/vtkmodules/web/wslink.py", line 63, in registerVtkWebProtocol</span></p>
<p class="gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:Courier;color:rgb(77,47,45);background-color:rgb(223,219,195)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="gmail-Apple-converted-space"> </span>self.registerLinkProtocol(protocol)</span></p>
<p class="gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:Courier;color:rgb(77,47,45);background-color:rgb(223,219,195)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="gmail-Apple-converted-space"> </span>File "/Applications/ParaView-5.4.1-1232-g1496380e37.app/Contents/Python/wslink/websocket.py", line 89, in registerLinkProtocol</span></p>
<p class="gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:Courier;color:rgb(77,47,45);background-color:rgb(223,219,195)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="gmail-Apple-converted-space"> </span>assert( isinstance(protocol, LinkProtocol))</span></p>
<p class="gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:Courier;color:rgb(77,47,45);background-color:rgb(223,219,195)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">AssertionError</span></p>
<br></div><div>At least I think that's what it's saying.</div><div><br></div><div>Thank you,</div><div><br></div><div> -Tom</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Feb 22, 2018 at 6:25 AM, Sgouros, Thomas <span dir="ltr"><<a href="mailto:thomas_sgouros@brown.edu" target="_blank">thomas_sgouros@brown.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Turns out you can't use capital letters for the protocol options (what should I call them?), according to the discussion at this link. Some people here might find it familiar: <a href="https://groups.google.com/forum/#!topic/autobahnws/mkjF21Fb8ow" target="_blank">https://groups.<wbr>google.com/forum/#!topic/<wbr>autobahnws/mkjF21Fb8ow</a><div><br></div><div> -Tom<br><div><br></div><div><br></div></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Feb 21, 2018 at 7:56 PM, Scott Wittenburg <span dir="ltr"><<a href="mailto:scott.wittenburg@kitware.com" target="_blank">scott.wittenburg@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">That actually looks ok to me. Why isn't pvpython happy with it? What version of ParaView are you running? If it's a recent ParaView and the problem is you can't import wslink, then setting up a virtualenv with the missing modules (wslink and its dependencies) might be what you need. See this blog post for more information on how to use pvpython but also bring in the modules in your virtualenv:<div><br></div><div><a href="https://blog.kitware.com/using-pvpython-and-virtualenv/" target="_blank">https://blog.kitware.com/using<wbr>-pvpython-and-virtualenv/</a></div><div><br></div><div>If the problem is something else, we might need more details.</div><div><br></div><div>Hope this helps.</div><div><br></div><div>Cheers,</div><div>Scott<br><div><br></div><div><br></div></div></div><div class="m_-924777860991018037HOEnZb"><div class="m_-924777860991018037h5"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Feb 21, 2018 at 5:44 PM, Sgouros, Thomas <span dir="ltr"><<a href="mailto:thomas_sgouros@brown.edu" target="_blank">thomas_sgouros@brown.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Thank you that's very helpful. Where will I find how to define the protocols on the python side? I've only found a wslink example that looks like this:<div><br></div><div><div>from wslink import register as exportRPC</div><div>from wslink.websocket import LinkProtocol</div><div><br></div><div>class myProtocol(LinkProtocol):</div><div> def __init__(self):</div><div> super(myProtocol, self).__init__()</div><div><br></div><div> @exportRPC("myprotocol.testBut<wbr>ton")</div><div> def testButton(self, nothing):</div><div> print("******* HELP ********")</div></div><div><br></div><div>Pvpython isn't happy with this, but I'm not sure where to look for the right way to do it.</div><div><br></div><div>Thank you,</div><div><br></div><div> -Tom</div></div><div class="m_-924777860991018037m_8962320978751176733HOEnZb"><div class="m_-924777860991018037m_8962320978751176733h5"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Feb 21, 2018 at 6:55 PM, Scott Wittenburg <span dir="ltr"><<a href="mailto:scott.wittenburg@kitware.com" target="_blank">scott.wittenburg@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Yes that link is old and broken, but if you navigate through the api docs links, that is working. Here's the direct link to the page you couldn't find though:<div><br></div><div><a href="https://kitware.github.io/paraviewweb/api/IO_WebSocket_ParaViewWebClient.html" target="_blank">https://kitware.github.io/para<wbr>viewweb/api/IO_WebSocket_ParaV<wbr>iewWebClient.html</a><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="m_-924777860991018037m_8962320978751176733m_-177934128691423305h5">On Wed, Feb 21, 2018 at 4:43 PM, Sgouros, Thomas <span dir="ltr"><<a href="mailto:thomas_sgouros@brown.edu" target="_blank">thomas_sgouros@brown.edu</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="m_-924777860991018037m_8962320978751176733m_-177934128691423305h5"><div dir="ltr">Hello all:<div><br></div><div>Got some nice looking buttons and widgets, but I can't seem to find examples of how to deliver the button press or other widget output to my pvpython server. I imagine the steps are:</div><div><br></div><div>1. Create a protocol on the python side. Can I use wslink.register, or is there paraviewweb functionality I should be using? </div><div><br></div><div>2. Create a matching protocol on the js side, with ParaviewWebClient.createClient<wbr>(), but I'm not seeing how to link the protocol to a function that can be linked to a button press.</div><div><br></div><div>Also, this page, found via a google search, seems potentially useful, but gives me a 404.</div><div> </div><a href="https://kitware.github.io/paraviewweb/api/ParaViewWebClient.html" target="_blank">https://kitware.github.io/para<wbr>viewweb/api/ParaViewWebClient.<wbr>html</a><div><br></div><div>Many thanks,</div><div><br></div><div> -Tom</div></div>
<br></div></div>______________________________<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/opensou<wbr>rce/opensource.html</a><br>
<br>
Please keep messages on-topic and check the ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView" rel="noreferrer" target="_blank">http://paraview.org/Wiki/ParaV<wbr>iew</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=ParaView" rel="noreferrer" target="_blank">http://markmail.org/search/?q=<wbr>ParaView</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="https://public.kitware.com/mailman/listinfo/paraview" rel="noreferrer" target="_blank">https://public.kitware.com/mai<wbr>lman/listinfo/paraview</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>