Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Forms with a media column result in unhelpful error message. #601

Closed
yanokwa opened this issue Apr 1, 2022 · 2 comments
Closed

Forms with a media column result in unhelpful error message. #601

yanokwa opened this issue Apr 1, 2022 · 2 comments

Comments

@yanokwa
Copy link
Contributor

yanokwa commented Apr 1, 2022

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?

@lognaturel
Copy link
Contributor

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.

@lognaturel
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants