Closed James-Crean closed 6 years ago
Cdms2 will return this error if an axis name/key is unicode rather than an ascii string.
Works: {'latitude': [0,1]}
Errors: {u'latitude': [0,1]}
I tested a simple fix myself that replaces the following code block in Visualizer.py:
if ('subRegion' in op):
kargs = op['subRegion']
var = var.subRegion(**kargs)
with this:
if ('subRegion' in op):
kargs = op['subRegion']
fixed_kargs = {}
for key in kargs.keys():
fixed_kargs[str(key)] = kargs[key]
var = var.subRegion(**fixed_kargs)
And subsetting began to work again.
@James-Crean can you file an issue for this on cdms repo? thx.
Hi @James-Crean and @doutriaux1 , I'm just checking if there's some action you want me to take here?
In the absence of some over-arching policy regarding character encodings, I'm not sure what to do on the web end. If we try and "clean" (by forcing everything to ascii strings) all the data that comes from people's different browsers, we could probably prevent this particular error, but then I think we will have ruled out the use of any other languages on the front end.
I'm not sure, but the right approach might be to formalize our notion of character encoding for a session, and then make sure the backend can handle that as long as it know what that encoding is.
No worries Scott. We found that this is actually an issue with cdms, so vcs-js doesn't need to worry about the encodings. I'll closer this issue since there is nothing to be done here
Plotting variables works fine so long as the latitude/logitude/time/etc are not changed.
When plotting a variable with dimensions other than the default the following error occurs:
Here is the relevant stack trace: