diff --git a/swash/processing/read_swash.py b/swash/processing/read_swash.py index 74b9aea..26a3014 100644 --- a/swash/processing/read_swash.py +++ b/swash/processing/read_swash.py @@ -14,7 +14,7 @@ class ReadSwash: @classmethod def read_nohead(cls, path): - with tempfile.TemporaryFile() as tmpfile: + with tempfile.SpooledTemporaryFile() as tmpfile: with open(path) as file: subprocess.run(("tr", "-d", "\n"), stdin=file, stdout=tmpfile) tmpfile.seek(0)