XLSForm/pyxform

Forms with a media column result in unhelpful error message.

yanokwa opened this issue · 2 comments

If you have a form with a media column (not media::image) and something in that column, pyxform gives a very unhelpful error.

Error: 'str' object has no attribute 'items'

See test.xlsx for an example.

It would be ideal if we warn that the column heading is likely to be incorrect. Maybe we build on the sheet name checking at #544?

media is not a known column name. It used to just be ignored like other unknown columns but since the translation checks were added, there's an assumption that media will be a dictionary.

I wanted to add a helpful error message but then I realized that we don't currently have an example of rejecting based on an issue in the header.

In the mean time, I propose restoring the prior behavior which is to ignore the unknown column name.

I think getodk/docs#1546 will sufficiently address this.