[ckan-dev] CKAN GeoJSON preview triggers internal server error on extension .geojson - use .json

Florian May florian.wendelin.mayer at gmail.com
Thu Feb 27 01:51:55 UTC 2014


Hi all,

here's an embarrassing pitfall I'd like to share re GeoJSON preview.
Attaching a GeoJSON file as a resource with the perfectly legal file
extension ".geojson" will trigger an internal server error on retrieval of
the file, making both download and preview impossible.

The embarrassingly simple solution was to use the extension ".json" for
GeoJSON files, but still register them as format "geojson" in the "attach
resource" form. All error messages (logs, firebug, request headers) were
absolutely not helpful, and web searches didn't get me onto the right path
either.

Seems others have run into the same error just now:
https://github.com/ckan/ckan/issues/1534

A simple note to use .json for GeoJSON resources in the user guide might go
a long way though, as normal end users are not likely to discover the above
github issue. I've submitted this change to the user docs as pull request
https://github.com/ckan/ckan/pull/1553

Hope that helps!

Cheers,
Florian

Dept Parks and Wildlife, WA
http://data-demo.dpaw.wa.gov.au/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20140227/dd723dff/attachment-0002.html>


More information about the ckan-dev mailing list