[vtkusers] Json object error caused by websocket.py

Aron Helser aron.helser at kitware.com
Thu Mar 15 21:30:34 EDT 2018


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> 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>
> *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> 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
>>
>>>>
>>
>>
>>
>> Regards,
>>
>>
>> Zhuangming Shen
>>
>> _______________________________________________
>> 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 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/20180315/f162458b/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pastedImage.png
Type: image/png
Size: 40575 bytes
Desc: not available
URL: <https://vtk.org/pipermail/vtkusers/attachments/20180315/f162458b/attachment.png>


More information about the vtkusers mailing list