Program that runs perfectly fine on one of the windows computers, but fails on the other windows computers

What are you trying to achieve?:
I wrote a program that runs perfectly fine on a mac and one of the windows computers, but fails on the other windows computers, report loop name is not defined.
I want to ask why. The versions of windows and psychopy on both computers are the same.

Just like the question in this post.

Include pasted full error message if possible. “That didn’t work” is not enough information.
bug_report.zip (30.2 KB)

program_example.zip (279.0 KB)

OS (e.g. Win10): macos 13.6 and windows 11 22h2
PsychoPy version (e.g. 1.84.x):
macos 2023.2.2
PsychoPy 2023.2.2

Paths to files on the system:
userPrefsFile: /Users/jade/.psychopy3/userPrefs.cfg
appDataFile: /Users/jade/.psychopy3/appData.cfg
demos: /Applications/PsychoPy.app/Contents/Resources/lib/python3.8/psychopy/demos
appFile: /Applications/PsychoPy.app/Contents/Resources/lib/python3.8/psychopy/app/PsychoPy.py

System Info:
Operating System: macOS-10.16-x86_64-i386-64bit
Processor: i386
CPU freq (MHz): 2800
CPU cores: 4 (physical), 8 (logical)
Installed memory: 17179869184 (Total), 5426839552 (Available)
macOS 10.16 running on x86_64

Python info:
Executable path: /Applications/PsychoPy.app/Contents/MacOS/python
Version: 3.8.10 (v3.8.10:3d8993a744, May 3 2021, 08:55:58)
[Clang 6.0 (clang-600.0.57)]
(Selected) Installed Packages:
numpy (1.23.5)
scipy (1.10.1)
matplotlib (3.7.1)
pyglet (1.5.27)
PyGLFW (2.0.0)
pyo [not installed]
psychtoolbox (3.0.18.2)
wxPython (4.1.1)

OpenGL Info:
Vendor: ATI Technologies Inc.
Rendering engine: AMD Radeon Pro 555 OpenGL Engine
OpenGL version: 2.1 ATI-4.14.1
Shaders supported: True
(Selected) Extensions:
GL_ARB_multitexture: True
GL_EXT_framebuffer_object: True
GL_ARB_fragment_program: True
GL_ARB_shader_objects: True
GL_ARB_vertex_shader: True
GL_ARB_texture_non_power_of_two: True
GL_ARB_texture_float: True
GL_STEREO: False
max vertices in vertex array: 1048575

Standard Standalone? (y/n) If not then what?:Y

This does not seem to be a problem with my program, because I ran all the demos and this error was reported whenever loops were involved, including but not limited to the stroop paradigm.

This is the detailed parameter of psychopy on the computer that reported the error

PsychoPy 2023.2.2

Paths to files on the system:
userPrefsFile: C:\Users\psy\AppData\Roaming\psychopy3\userPrefs.cfg
appDataFile: C:\Users\psy\AppData\Roaming\psychopy3\appData.cfg
demos: C:\Program Files\PsychoPy\lib\site-packages\psychopy\demos
appFile: C:\Program Files\PsychoPy\lib\site-packages\psychopy\app\PsychoPy.py

System Info:
Operating System: Windows-10-10.0.22621-SP0
Processor: AMD64 Family 25 Model 80 Stepping 0, AuthenticAMD
CPU freq (MHz): 2301.0
CPU cores: 6 (physical), 12 (logical)
Installed memory: 16442773504 (Total), 9612066816 (Available)

Python info:
Executable path: C:\Program Files\PsychoPy\python.exe
Version: 3.8.10 (tags/v3.8.10:3d8993a, May 3 2021, 11:48:03) [MSC v.1928 64 bit (AMD64)]
(Selected) Installed Packages:
numpy (1.24.4)
scipy (1.7.2)
matplotlib (3.4.3)
pyglet (1.4.11)
PyGLFW (2.4.0)
pyo 1.0.4
psychtoolbox (3.0.18.2)
wxPython (4.1.1)

OpenGL Info:
Vendor: ATI Technologies Inc.
Rendering engine: AMD Radeon ™ Graphics
OpenGL version: 4.6.0 Compatibility Profile Context 22.20.26.08.221227
Shaders supported: True
(Selected) Extensions:
GL_ARB_multitexture: True
GL_EXT_framebuffer_object: True
GL_ARB_fragment_program: True
GL_ARB_shader_objects: True
GL_ARB_vertex_shader: True
GL_ARB_texture_non_power_of_two: True
GL_ARB_texture_float: True
GL_STEREO: False
max vertices in vertex array: 536870911

Hello

The error message is NameError: name ‘standard_audio’ is not defined. Have you set up your audio preferences in the same way on both computers?

Best wishes Jens

Yes, the sound libraries of my multiple devices are all ptb, and their priority is 2, because they use the exact same program file.
And I also tried other sound libraries such as pyo and other priorities, and the same error was reported.

And the same is true for stroop and other demos, with the same sound library and priority.