frictionlessdata / goodtables-web

[DEPRECATED] Please use http://try.goodtables.io/
MIT License
15 stars 6 forks source link

Internal server error on submit #40

Closed rufuspollock closed 9 years ago

rufuspollock commented 9 years ago

Steps to reproduce:

  1. Visit http://goodtables.okfnlabs.org/
  2. Paste a url e.g. https://www.gov.uk/government/uploads/system/uploads/attachment_data/file/407609/Publishable_December_2014_Spend.csv and select schema (e.g. HMT spending)
  3. Hit submit
  4. Internal server error
pwalsh commented 9 years ago

I can reproduce. Will fix over next 24 hours.

pwalsh commented 9 years ago

Bug is fixed.

rufuspollock commented 9 years ago

@pwalsh what was the bug?

pwalsh commented 9 years ago

The bug was an unhandled case where column names in the data are not found in the schema (admittedly, this is likely to be common and should have been covered by tests earlier).

In this case, we correctly write an error when looking at data headers, but when iterating rows, the code was still trying to work with a jtskit.models.SchemaModel instance using data (column names) that the schema model doesn't know about.

jtskit does the right thing (return None) but goodtables did not do the right thing (never expected a None).