Open MarcSkovMadsen opened 2 years ago
Is this surprising? How would ReactiveHTML know how to serialize a PIL image?
Oh right, got you sorry. The solution here is to set a negative precedence for anything you don't want to serialize.
Thanks. The solution to that bug would then be to document the solution it I guess.
It would probably be even better to be able to specify in child_config
or somewhere else that the parameter should not be serialized and transfered.
And maybe make this a warning with a suggestion to set the precedence if you don't need the item serialized?
Not easy to do since it's non-trivial to determine what can and can't be serialized ahead of time.
I guess it can't be a caught exception? (Since the exception presumably aborts the whole serialization step?)
The serialization happens in the whole application's context and at that point there is no easy way to map that back to the model being serialized or even the specific property/parameter being serialized.
Basically by the time you get to the serialization step it's already way too late.
Param's JSON schema support has a mode that detects if serialization is potentially unsafe, but that would presumably be too trigger-happy here.
Param's JSON schema support has a mode that detects if serialization is potentially unsafe, but that would presumably be too trigger-happy here.
Significantly so, Param -> Bokeh Property conversion is significantly more powerful than what Param supports.
panel: 0.12.4
My Pain
I am trying to create a ReactiveHTML ImageViewer for pillow
Image
s. I want be able to provide a pillow Image and then transfer then image as a data url to the client side. I.e. theimage
should not be transfered.But I get
TypeError: Object of type Image is not JSON serializable
The problem here is that
ReactiveHTML
only supports JSON serializable parameters including parameters that it does not have to transfer.