[vtkusers] Json object error caused by websocket.py

沈庄明 zhuangming.shen at sphic.org.cn
Thu Mar 15 23:41:58 EDT 2018


Hi Aron,


Attached is the vtkweb example I mentioned. It can display a cone on the web. Hope you are familiar with it. The "www" folder are some js files. And "web" folder is actually found in <VTK_build>.



Regards,


Zhuangming Shen

________________________________
From: Aron Helser <aron.helser at kitware.com>
Sent: Friday, March 16, 2018 9:30 AM
To: 沈庄明; VTK Users
Subject: Re: [vtkusers] Json object error caused by websocket.py

Hi  Zhuangming,
(adding back the list)

We have tested wslink and vtk with python 3.5 and 3.6. They may use some features that require 3.5, but I'm not sure if there would be any issues with 3.4.

Which vtkweb example are you following? It is likely to be very similar with wslink - we designed it to require very few changes from the previous implementation.

Regards,
Aron

On Thu, Mar 15, 2018 at 4:50 AM, 沈庄明 <zhuangming.shen at sphic.org.cn<mailto:zhuangming.shen at sphic.org.cn>> wrote:

?Hi Aron,


Sorry for interrupting you again. I'm learning how to use wslink in my project. My project is coded using previous vtkweb framework, and learn a lot from its simple example to display a cone on the browse. Now I would like to use wslink, which can support python 3.x, to replace the old framework. I am not sure if you could provide me a similar simple example. Then I could learn by myself how to do that. Thanks in advance.



Regards,


Zhuangming Shen

________________________________
From: Aron Helser <aron.helser at kitware.com<mailto:aron.helser at kitware.com>>
Sent: Wednesday, March 14, 2018 11:51 PM
To: 沈庄明
Subject: Re: [vtkusers] Json object error caused by websocket.py

Thanks for the report - we've tested with Python 3.6, but I'm not sure there's automated testing for this code.
If you'd like to report a bug, that'd be great.

Thanks!
Aron

On Wed, Mar 14, 2018 at 4:11 AM, 沈庄明 <zhuangming.shen at sphic.org.cn<mailto:zhuangming.shen at sphic.org.cn>> wrote:

Hi all,


I found there probably be a bug around Line 250 in <VTK_build>/Wrapping/Python/wslink/websocket.py. If this code is run using python 3.x, this will cause an error "json object must be str not 'bytes' " when use json.loads. To avoid this error, I think the code can be modified by

?

[cid:b10da89b-5d6c-40ac-898d-8db128fb6001]



Regards,


Zhuangming Shen

_______________________________________________
Powered by www.kitware.com<http://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 VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
https://vtk.org/mailman/listinfo/vtkusers



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://vtk.org/pipermail/vtkusers/attachments/20180316/0a044fff/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pastedImage.png
Type: image/png
Size: 40575 bytes
Desc: pastedImage.png
URL: <https://vtk.org/pipermail/vtkusers/attachments/20180316/0a044fff/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vtk-web_example.rar
Type: application/octet-stream
Size: 1721356 bytes
Desc: vtk-web_example.rar
URL: <https://vtk.org/pipermail/vtkusers/attachments/20180316/0a044fff/attachment-0001.obj>


More information about the vtkusers mailing list