Django import export keep reading blank line

Viewed 79

I'm using django-import-export. But sometimes I got an error when importing xlsx file. The error is simple actually. It keeps reading the blank row so it generates an error.

For example, in my xlsx file, there are only two rows (one for the table header and one for the data). I don't know why but it also read the second and the third row even though there is no data in it.

The error is something like this:

Line number: 2 - 'NoneType' object has no attribute 'lower'
None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None

Of course, the data is all None, because I only want to import only one data so the second row is empty.

How to fix this? Thanks.

0 Answers
Related