cate no longer opening Sea Level datasets
Please read this carefully before submitting a new issue:
- Make sure the issue you are about to report has not been reported before!
- If you are allowed to assign labels, please
- Use label "support_request" if you have a question
- Use label "help_wanted" if you are a Cate developer and you have an issue that falls completely in your scope of activity, but with which you are stuck with and need help with.
- Use label "discussion" for an issue that doesn't warrant code changes right away, but is rather meant as a place for discussion on how to solve a particular problem.
- The following template should be used for reporting bugs, inconsistencies, and feature requests. Note that you can use hashtag followed by issue number to refer to other issues (e.g. #234) and use the add character followed by a GitHub user name (e.g. @forman) to refer to other users.
Expected behavior
I expected cate to download the CCI Sea Level Datasets avaiable on ODP, i.e. esacci.SEALEVEL.*
Actual behavior
cate gives Invalid Reponse (not JSON-serializable)
Steps to reproduce the problem
- try to download a sea level dataset
Specifications
Traceback (most recent call last): File "/Users/paolocipollini/cate-2.0.0.dev10/lib/python3.7/site-packages/cate/util/web/jsonrpchandler.py", line 278, in _write_json_rpc_response json_text = json.dumps(json_rpc_response) File "/Users/paolocipollini/cate-2.0.0.dev10/lib/python3.7/json/init.py", line 231, in dumps return _default_encoder.encode(obj) File "/Users/paolocipollini/cate-2.0.0.dev10/lib/python3.7/json/encoder.py", line 199, in encode chunks = self.iterencode(o, _one_shot=True) File "/Users/paolocipollini/cate-2.0.0.dev10/lib/python3.7/json/encoder.py", line 257, in iterencode return _iterencode(o, 0) File "/Users/paolocipollini/cate-2.0.0.dev10/lib/python3.7/json/encoder.py", line 179, in default raise TypeError(f'Object of type {o.class.name} ' TypeError: Object of type DatetimeJulian is not JSON serializable
In addition to my issue report - I v'e noticed I have the same issue (not JSON-serializable) also with LOCAL copies of the Sea Level datasets that used to be loaded correctly with the previous version of cate
Further addition: as with previous versions of cate I had not experienced this issue I just reverted to 2.0.0 rev20, which I am 100% sure was working fine for me (MacOS) at the time, and tire to load Sea Level and Ocean Colour CCI data both locally and from the Open Data Portal. In all cases I now get this JSON error ("TypeError: Object of type DatetimeJulian is not JSON serializable"). Note that the ODP datasets are indeed downloaded locally - so they are found, but the issue is in trying to open them. I have therefore edited the issue title
Title too broad & unspecific; implies no datasets loading at all.
Title amended to delimit issue, summarised again below
We get this error TypeError: Object of type DatetimeJulian is not JSON serializable
when trying to open any of the esacci.SEALEVEL.*. files from ODP
Some problem happens trying to open local copies of esacci.SEALEVEL.*
@cipogh, still having the same problem?
@forman yes, I have just checked and I am still having the same "not JSON serializable" both with ODP and local Sea Level datasets.
And if you move away the data folder or specify a new one, does the problem persist?
Issue may be related to some updates in Cate's library dependencies, as this used to work before and there where no code changes since then.
Although we now have a total of 25 Sea Level datasets, it seems that none of them is supported perfectly. At best, we can open the dataset but only extract the same time value for all time steps (his happens, for most datasets with a monthly resolution). For datasets with a 10-day resolution, no valid timestamps can be derived. Then there are other datasets that have no lat and lon but dimensions as nbpoints or nbcycles.
It seems this issue is closely associated with https://github.com/dcs4cop/xcube-cci/issues/12