我在Python中用pygame做了一个程序,代码如下:
import pygame
import sys
import time
from pygame.locals import *
pygame.init()
DISPLAYSURF=pygame.display.set_mode((400,300))
pygame.display.set_caption(' ')
# 设置
music_bb_ok=True
# 颜色
# R G B
THE_HIND_COLOR=(39,39,39)
# 窗口设置
DISPLAYSURF.fill(THE_HIND_COLOR)
# 函数
def music_1():
soun=pygame.mixer.Sound('./music/plane_bbs_ok.wav')
soun.play()
time.sleep(0.68)
soun.stop()
while True: # 主程序
for event in pygame.event.get():
if event.type == QUIT:
pygame.quit()
sys.exit()
elif music_bb_ok:
music_1()
pygame.display.update()
报错:pytho:Invalid RVA mode. (code 12)
怎么解决?