--- a/dataimport.py Tue Jul 19 13:50:56 2016 +0200 +++ b/dataimport.py Tue Jul 19 12:47:28 2016 +0200 @@ -95,6 +95,7 @@ else: f = stream_or_filename f.seek(0) + i = 0 # useful is f is an empty file for i, line in enumerate(f): pass f.seek(0)