You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! I have some model output I am trying to serve with xpublish (and xpublish-host and kerchunk). This model output has compression, and when I try to access it through the server I get the following error, though I am able to just open the model output fine (pointing to the kerchunked file):
TypeError: Object of type Shuffle is not JSON serializable
Indeed, a "Shuffle" object is in the metadata, for example here is what it shows in the xpublish code for an example variable:
I'm not sure why the compressor items remained a dictionary but the filter item was converted to an object, which is what seems to cause the issue. In the metadata coming out of kerchunk the filter item looked like
"filters":[{"elementsize":8,"id":"shuffle"}]
(I'm not sure if that change in "elementsize" is important as I go back and forth between two cases I'm testing, but I can track it down if it seems relevant.)
Does anyone follow this? I am not sure how to set up an actual working example for this workflow yet.
The text was updated successfully, but these errors were encountered:
Update: I removed the filters encoding in my plugin for serving the model output and that seems to have fixed the issue. I've been trying to resist reset all of the encoding with ds.reset_encoding() so I did:
for varname in ds.variables:
del ds[varname].encoding["filters"]
I'll close this for now as I seem to have sidestepped the issue but will open it if needed. Thanks. 🦆
Hi! I have some model output I am trying to serve with
xpublish
(andxpublish-host
andkerchunk
). This model output has compression, and when I try to access it through the server I get the following error, though I am able to just open the model output fine (pointing to the kerchunked file):Indeed, a "Shuffle" object is in the metadata, for example here is what it shows in the
xpublish
code for an example variable:I'm not sure why the compressor items remained a dictionary but the filter item was converted to an object, which is what seems to cause the issue. In the metadata coming out of
kerchunk
the filter item looked like(I'm not sure if that change in "elementsize" is important as I go back and forth between two cases I'm testing, but I can track it down if it seems relevant.)
Does anyone follow this? I am not sure how to set up an actual working example for this workflow yet.
The text was updated successfully, but these errors were encountered: