Why have you picked these fonts? Have you checked they work when added directly to the textboxes? Since you are running locally, why don’t you know which platform you are using?
Chinese
if sys.platform == "win32":
text_font = "Microsoft YaHei" # Windows上的中文字体
word_text = "你好";
elif sys.platform == "darwin":
text_font = "PingFang" # macOS上的中文字体
word_text = "你好";
else:
text_font = "WenQuanYi Zen Hei" # Linux上的中文字体
word_text = "你好";
English
# 自动选择英文字体(Windows,macOS,Linux)
if sys.platform == "win32":
text_font = "Arial" # Windows 上常用的英文字体
word_text = "hello"
elif sys.platform == "darwin":
text_font = "Helvetica" # macOS 上常用的英文字体
word_text = "hello"
else:
text_font = "Verdana" # Linux 上常用的英文字体
word_text = "hello"
Japanese
# 自动选择字体(Windows,macOS,Linux)
if sys.platform == "win32":
text_font = "Yu Gothic" # Windows 上的日文字体
word_text = "おはようございます"
elif sys.platform == "darwin":
text_font = "MS PGothic" # macOS 上的日文字体
word_text = "おはようございます"
else:
text_font = "Noto Sans CJK" # Linux 和其他系统上的字体
word_text = "おはようございます"
Also you have this code in Begin Experiment three times
import sys
from psychopy import visual
You don’t need them at all. Builder automatically adds code like
# --- Import packages ---
from psychopy import locale_setup
from psychopy import prefs
from psychopy import plugins
plugins.activatePlugins()
prefs.hardware['audioLib'] = 'ptb'
from psychopy import sound, gui, visual, core, data, event, logging, clock, colors, layout, hardware
from psychopy.tools import environmenttools
from psychopy.constants import (
NOT_STARTED, STARTED, PLAYING, PAUSED, STOPPED, STOPPING, FINISHED, PRESSED,
RELEASED, FOREVER, priority
)
import numpy as np # whole numpy lib is available, prepend 'np.'
from numpy import (sin, cos, tan, log, log10, pi, average,
sqrt, std, deg2rad, rad2deg, linspace, asarray)
from numpy.random import random, randint, normal, shuffle, choice as randchoice
import os # handy system and path functions
import sys # to get file system encoding
import psychopy.iohub as io
from psychopy.hardware import keyboard