Commit c209e8a6 authored by sim's avatar sim

[FIX] Fix CSV parse error when input contains blank lines

parent 28c2b4c9
...@@ -15,7 +15,7 @@ class CSVParser(Parser): ...@@ -15,7 +15,7 @@ class CSVParser(Parser):
contents = filebuf.read().decode("UTF-8").split("\n") contents = filebuf.read().decode("UTF-8").split("\n")
# Filter out empty lines # Filter out empty lines
contents = list(filter(None, contents)) contents = [line for line in contents if line.strip()]
sample_size = 10 sample_size = 10
sample_contents = contents[0:sample_size] sample_contents = contents[0:sample_size]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment