diff --git a/csep/core/catalogs.py b/csep/core/catalogs.py index 9a5a374e..b4257bb2 100644 --- a/csep/core/catalogs.py +++ b/csep/core/catalogs.py @@ -325,7 +325,7 @@ def write_ascii(self, filename, write_header=True, write_empty=True, append=Fals write_string = 'a' else: write_string = 'w' - with open(filename, write_string) as outfile: + with open(filename, write_string, newline='') as outfile: writer = csv.DictWriter(outfile, fieldnames=header, delimiter=',') if write_header: writer.writeheader()