[ECODP-dev] Error message about last_modified field, on posting through rdf2ckan

John Glover john.glover at okfn.org
Mon Jul 29 13:05:19 UTC 2013

Hi Dimitrios,

Did that last_modified value come from CKAN or did you create it yourself?

CKAN is expecting a 6-digit value for the microseconds (so '000000' instead
of just '0' at the end of the string, or else omit the microsecond part
entirely) and therefore complaining that the date format is invalid.


On 23 July 2013 15:06, Dimitrios Mexis <dimitrios.mexis at tenforce.com> wrote:

> Hi,
> the first is the POST of JSON to CKAN, and the next line is the response.
> Can you help us understand what happens exactly with the date field
> last_modified ?
> {"resources":[{"last_modified":"2009-11-12T23:42:30.0","description":"Zipped
> TIFF format with world file, raster data","format":"image/tiff","type":"
> http://www.w3.org/TR/vocab-dcat#Download","url":"
> http://www.eea.europa.eu/data-and-maps/data/global-land-cover-2000-europe/zipped-tiff-format-with-world-file-raster-data/zipped-tiff-format-with-world-file-raster-data/at_download/file
> "}],"geographical_coverage":["
> http://publications.europa.eu/resource/authority/country/DEU","
> http://publications.europa.eu/resource/authority/country/LVA","
> http://publications.europa.eu/resource/authority/country/KAZ","
> http://publications.europa.eu/resource/authority/country/GEO","
> http://publications.europa.eu/resource/authority/country/FRA","
> http://publications.europa.eu/resource/authority/country/BLR","
> http://publications.europa.eu/resource/authority/country/AZE","
> http://publications.europa.eu/resource/authority/country/AUT","
> http://publications.europa.eu/resource/authority/country/ARM","
> http://publications.europa.eu/resource/authority/country/HRV","
> http://publications.europa.eu/resource/authority/country/BGR","
> http://publications.europa.eu/resource/authority/country/BIH","
> http://publications.europa.eu/resource/authority/country/BEL","
> http://publications.europa.eu/resource/authority/country/EST","
> http://publications.europa.eu/resource/authority/country/ALB","
> http://publications.europa.eu/resource/authority/country/SRB","
> http://publications.europa.eu/resource/authority/country/SVK","
> http://publications.europa.eu/resource/authority/country/UKR","
> http://publications.europa.eu/resource/authority/country/ISL","
> http://publications.europa.eu/resource/authority/country/NLD","
> http://publications.europa.eu/resource/authority/country/HUN","
> http://publications.europa.eu/resource/authority/country/NOR","
> http://publications.europa.eu/resource/authority/country/GBR","
> http://publications.europa.eu/resource/authority/country/PRT","
> http://publications.europa.eu/resource/authority/country/IRL","
> http://publications.europa.eu/resource/authority/country/CZE","
> http://publications.europa.eu/resource/authority/country/MNE","
> http://publications.europa.eu/resource/authority/country/SVN","
> http://publications.europa.eu/resource/authority/country/CYP","
> http://publications.europa.eu/resource/authority/country/SWE","
> http://publications.europa.eu/resource/authority/country/DNK","
> http://publications.europa.eu/resource/authority/country/ESP","
> http://publications.europa.eu/resource/authority/country/FIN","
> http://publications.europa.eu/resource/authority/country/CHE","
> http://publications.europa.eu/resource/authority/country/GRC","
> http://publications.europa.eu/resource/authority/country/LUX","
> http://publications.europa.eu/resource/authority/country/TUR","
> http://publications.europa.eu/resource/authority/country/LIE","
> http://publications.europa.eu/resource/authority/country/MLT","
> http://publications.europa.eu/resource/authority/country/MDA","
> http://publications.europa.eu/resource/authority/country/RUS","
> http://publications.europa.eu/resource/authority/country/POL","
> http://publications.europa.eu/resource/authority/country/LTU","
> http://publications.europa.eu/resource/authority/country/ROU","
> http://publications.europa.eu/resource/authority/country/ITA
> "],"published_by":"eea","status":"
> http://ec.europa.eu/open-data/kos/dataset-status/Completed","keyword_string":["raster
> data","land cover","vegetation","geospatial data"],"url":"
> http://www.eea.europa.eu/data-and-maps/data/global-land-cover-2000-europe","title":"Global
> land cover 2000 - Europe","type_of_dataset":[],"description":"This
> pan-European classification does not represent a perfect reproduction of
> Corine land cover in areas where CLC2000 and GLC2000
> overlap","interoperability_level":[],"name":"KtY2sRfM97NIDPdQ9SAQ","license_id":["
> http://creativecommons.org/licenses/by/2.5/dk/
> "],"language":[],"identifier":"global-land-cover-2000-europe"}
> 15:03 - Body: {"help": "Create a new dataset (package).\n\n    You must be
> authorized to create new datasets. If you specify any groups\n    for the
> new dataset, you must also be authorized to edit these groups.\n\n
>  Plugins may change the parameters of this function depending on the
> value\n    of the ``type`` parameter, see the ``IDatasetForm`` plugin
> interface.\n\n    :param name: the name of the new dataset, must be between
> 2 and 100\n        characters long and contain only lowercase alphanumeric
> characters,\n        ``-`` and ``_``, e.g. ``'warandpeace'``\n    :type
> name: string\n    :param title: the title of the dataset (optional,
> default: same as\n        ``name``)\n    :type title: string\n    :param
> author: the name of the dataset's author (optional)\n    :type author:
> string\n    :param author_email: the email address of the dataset's author
> (optional)\n    :type author_email: string\n    :param maintainer: the name
> of the dataset's maintainer (optional)\n    :type maintainer: string\n
>  :param maintainer_email: the email address of the dataset's maintainer\n
>      (optional)\n    :type maintainer_email: string\n    :param license_id:
> the id of the dataset's license, see ``license_list()``\n        for
> available values (optional)\n    :type license_id: license id string\n
>  :param notes: a description of the dataset (optional)\n    :type notes:
> string\n    :param url: a URL for the dataset's source (optional)\n
>  :type url: string\n    :param version: (optional)\n    :type version:
> string, no longer than 100 characters\n    :param state: the current state
> of the dataset, e.g. ``'active'`` or\n        ``'deleted'``, only active
> datasets show up in search results and\n        other lists of datasets,
> this parameter will be ignored if you are not\n        authorized to change
> the state of the dataset (optional, default:\n        ``'active'``)\n
>  :type state: string\n    :param type: the type of the dataset (optional),
> ``IDatasetForm`` plugins\n        associate themselves with different
> dataset types and provide custom\n        dataset handling behaviour for
> these types\n    :type type: string\n    :param resources: the dataset's
> resources, see ``resource_create()``\n        for the format of resource
> dictionaries (optional)\n    :type resources: list of resource
> dictionaries\n    :param tags: the dataset's tags, see ``tag_create()`` for
> the format\n        of tag dictionaries (optional)\n    :type tags: list of
> tag dictionaries\n    :param extras: the dataset's extras (optional),
> extras are arbitrary\n        (key: value) metadata items that can be added
> to datasets, each extra\n        dictionary should have keys ``'key'`` (a
> string), ``'value'`` (a\n        string), and optionally ``'deleted'``\n
>  :type extras: list of dataset extra dictionaries\n    :param
> relationships_as_object: see ``package_relationship_create()`` for\n
>  the format of relationship dictionaries (optional)\n    :type
> relationships_as_object: list of relationship dictionaries\n    :param
> relationships_as_subject: see ``package_relationship_create()`` for\n
>  the format of relationship dictionaries (optional)\n    :type
> relationships_as_subject: list of relationship dictionaries\n    :param
> groups: the groups to which the dataset belongs (optional), each\n
>  group dictionary should have one or more of the following keys which\n
>    identify an existing group:\n        ``'id'`` (the id of the group,
> string), ``'name'`` (the name of the\n        group, string), ``'title'``
> (the title of the group, string), to see\n        which groups exist call
> ``group_list()``\n    :type groups: list of dictionaries\n\n    :returns:
> the newly created dataset (unless 'return_id_only' is set to True\n
>      in the context, in which case just the dataset id will be returned)\n
>    :rtype: dictionary\n\n    ", "success": false, "error": {"__type": "*Validation
> Error", "resources": [{"last_modified": ["Date format incorrect"*]}]}}
> Regards
> Dimitrios
> _______________________________________________
> Ecodp-dev mailing list
> Ecodp-dev at lists.okfn.org
> http://lists.okfn.org/mailman/listinfo/ecodp-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.okfn.org/mailman/private/ecodp-dev/attachments/20130729/1c908ce5/attachment.html>

More information about the ecodp-dev mailing list