diff --git a/hardware/opentrons_hardware/sensors/sensor_driver.py b/hardware/opentrons_hardware/sensors/sensor_driver.py index ac40ddf0c11..84780695e66 100644 --- a/hardware/opentrons_hardware/sensors/sensor_driver.py +++ b/hardware/opentrons_hardware/sensors/sensor_driver.py @@ -243,7 +243,7 @@ def __init__( async def __aenter__(self) -> None: """Create a csv heading for logging pressure readings.""" - self.data_file = open(self.data_file, "a") + self.data_file = open(self.data_file, "w") self.csv_writer = csv.writer(self.data_file) self.csv_writer.writerows([self.file_heading, self.sensor_metadata])