Time.strftime(format, time.localtime()) gives ValueError: embedded null byte

If this template helps then use it. If not then just delete and start from scratch.

OS (e.g. Win10): win10
PsychoPy version (e.g. 1.84.x): 1.5

Traceback (most recent call last):
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\app\runner\runner.py”, line 554, in runLocal
exp=self.loadExperiment())
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\scripts\psyexpCompile.py”, line 73, in generateScript
compileScript(infile=exp, version=None, outfile=filename)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\scripts\psyexpCompile.py”, line 242, in compileScript
_makeTarget(thisExp, outfile, targetOutput)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\scripts\psyexpCompile.py”, line 221, in _makeTarget
script = thisExp.writeScript(outfile, target=targetOutput)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\experiment_experiment.py”, line 172, in writeScript
localDateTime = data.getDateStr(format="%B %d, %Y, at %H:%M")
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\data\utils.py”, line 626, in getDateStr
now = time.strftime(format, time.localtime())
ValueError: embedded null byte

this is how it comes out when use psychopy3 runner

Hmm. PsychoPy 1.5 didn’t have a Runner view at all. I guess this is a typo?

From googling the error message I found this:
Issue 25023: time.strftime('%a'), ValueError: embedded null byte, in ko locale - Python tracker
which suggested that the issue is a bug in windows when using Korean locale. You might be able to replace the file as listed in this post:
Message 295208 - Python tracker

Alternatively you might be able to change the locale in PsychoPy application preferences to something other than Korean. Note that you don’t need to change the locale of the whole windows installation(!) as you can override it with this psychopy setting.

Thank you so much, John. Thank you very much!!!:smiley: