# Data file delimiter set to semicolon, but automatic/crash-saved CSV uses commas (PsychoPy 2026.1.3)

**URL:** <https://discourse.psychopy.org/t/data-file-delimiter-set-to-semicolon-but-automatic-crash-saved-csv-uses-commas-psychopy-2026-1-3/47911>\
**Category:** Builder\
**Created:** [September 18, 2026, 4:46pm UTC](https://discourse.psychopy.org/t/data-file-delimiter-set-to-semicolon-but-automatic-crash-saved-csv-uses-commas-psychopy-2026-1-3/47911 "2026-09-18T16:46:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![richard\_naar](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/richard_naar/32/11592_2.png) [@richard\_naar](https://discourse.psychopy.org/u/richard_naar)\
**Post date:** [September 18, 2026, 4:46pm UTC](https://discourse.psychopy.org/t/data-file-delimiter-set-to-semicolon-but-automatic-crash-saved-csv-uses-commas-psychopy-2026-1-3/47911/1 "2026-09-18T16:46:25Z")

</div>

Hi,

I think I have found a possible inconsistency in how the Builder **Data file delimiter** setting is handled during normal saving versus PsychoPy’s automatic/fallback saving.

**Environment**

- PsychoPy Builder 2026.1.3

- Windows 10

- Data file delimiter in Experiment Settings explicitly set to **semicolon**

**Problem**

I noticed that some `.csv` files from my experiment were comma-delimited even though the experiment’s Data file delimiter was set to semicolon.

The normal Builder-generated save function correctly contains:

```auto
thisExp.saveAsWideText(filename + '.csv', delim='semicolon')
thisExp.saveAsPickle(filename)

```

So the Builder setting is being propagated correctly.

However, `ExperimentHandler.save()` appears to use:

```auto
self.saveAsWideText(self.dataFileName + '.csv')

```

without passing the experiment’s selected delimiter.

Since `saveAsWideText()` defaults to:

```auto
delim='auto'

```

and the filename ends in `.csv`, this results in comma-separated output.

`ExperimentHandler.close()` calls `self.save()`, and `close()` is registered with `atexit`, so this appears to affect the automatic/fallback save that PsychoPy uses when the experiment does not reach the normal Builder `saveData()` path.

As a temporary Builder workaround I am considering changing only the automatic `delim='auto'` behavior:

```auto
if not hasattr(data.ExperimentHandler, '_originalSaveAsWideText_semicolonFix'):
    data.ExperimentHandler._originalSaveAsWideText_semicolonFix = (
        data.ExperimentHandler.saveAsWideText
    )

def _saveAsWideText_semicolonFix(
    self, fileName, delim='auto', *args, **kwargs
):
    if delim == 'auto':
        delim = 'semicolon'

    return data.ExperimentHandler._originalSaveAsWideText_semicolonFix(
        self, fileName, delim, *args, **kwargs
    )

data.ExperimentHandler.saveAsWideText = _saveAsWideText_semicolonFix

```

Maybe this will be helpful to someone else who runs into the same issue. Cheers.

---

<div class="post-metadata">

**Author:** ![TParsons](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/tparsons/32/8301_2.png) [@TParsons](https://discourse.psychopy.org/u/TParsons)\
**Post date:** [September 21, 2026, 11:26am UTC](https://discourse.psychopy.org/t/data-file-delimiter-set-to-semicolon-but-automatic-crash-saved-csv-uses-commas-psychopy-2026-1-3/47911/2 "2026-09-21T11:26:11Z")

</div>

Yes, `ExperimentHandler.save` exists largely as a last resort to be used when the Experiment Handler is deleted if something like `saveData` from a Builder experiment can’t be called, but it does rely solely on the filename to infer delimiter.

I wonder whether we should just have `delim` be an attribute of the Experiment Handler, so that it can call `save` in its ` __del__ ` function with no arguments and still know what delimiter to use…
