aodn / python-aodntools

Repository for templates and code relating to generating standard NetCDF files for the Australia Ocean Data Network
GNU Lesser General Public License v3.0
10 stars 3 forks source link

error raised needs more info #31

Closed lbesnard closed 5 years ago

lbesnard commented 5 years ago

creating the following template

{
  "_dimensions": {
    "TIME": 0
  },
  "_variables": {
    "TIME": {
      "_dimensions": ["TIME"],
      "_datatype": "float64",
    },
    "LATITUDE": {
        "_dimensions": ["TIME"],
        "_datatype": "float64"
    },
    "LONGITUDE": {
        "_dimensions": ["TIME"],
        "_datatype": "float64",
    }
  },
  "title": "SOOP TMV"
}

There is a coma after datatype def of LONGITUDE. This is wrong. But running template = DatasetTemplate.from_json throws a

ValueError: Expecting property name: line 9 column 5 

not referring actually to the json template. It would be helpful to improve the valueerror log message as it gets tricky to debug