vtk.js remote view client failed to build.

Those error just means that you did not register the protocol that implement those RPC endpoints.

Hi, Sebastetien:

Can you teach me how to regiser one of the method?

Attached is my vtk_server.py and client.vue code? They are mainly copied from vtk.js remote examples on kitware website.
How do I register the method? In python code, or in java script code? Can you show me one example?
Many thanks.
vtk_server.py (5.7 KB)
HelloWorld.vue (2.1 KB)

I finally figure out what to do, will update shortly.

@Sebastien_Jourdain , @YaoDongcai :
Thanks for all your help, I finally figured out to make vtk.js remote rendering work.
1, As Sebastien said, I need to register those mothod, so I add one line of code at vtk_server.py
self.registerVtkWebProtocol(protocols.vtkWebPublishImageDelivery())

2, need to say sorry for @YaoDongcai , he post python code here last week, but I did not realize that code is different from kitware website example, after add this protocol, I still got error:

  • .env\lib\site-packages\vtkmodules\web\protocols.py", line 488, in stillRender
    reply[“memsize”] = reply_image.GetDataSize() if reply_image else 0
    AttributeError: ‘str’ object has no attribute ‘GetDataSize’

3, then I changed the vtkModulelibary code as below:

then it works. @Sebastien_Jourdain , can you let me know my change of libary will had further consequence?

The vtk_server.py does have that line

The code has always been there and working.

It is as simple as it can be.

that is my fault, I got from vtk-remote-render/server/vtk_server.py at master · dmreagan/vtk-remote-render (github.com)

By visually look, I thought they are same. If I used the correct vtk_server.py at beginning, I can immediately fix the no attribute errror. :grinning: :grinning:

reply[“memsize”] = reply_image.GetDataSize() if reply_image else 0
AttributeError: ‘str’ object has no attribute ‘GetDataSize’

The repository dmreagan/vtk-remote-render is not maintained by us and is relying on a library that has been deprecated since 2019.