【发布时间】:2015-02-24 07:51:22
【问题描述】:
Pygame.midi 无法被 PyCharm 识别。
我有 Python 2.7 的 pygame 版本 2.7
IDLE 似乎可以识别它,但 PyCharm 没有。这是为什么呢?
我正在尝试制作 DRUM vst,
但我还没有走远,因为出现以下错误:
Traceback (most recent call last):
File "C:/Users/user/PycharmProjects/POm/NewtonIncVST.py", line 12, in <module>
reading = in_port.midi.read()
AttributeError: 'int' object has no attribute 'midi'
代码示例
import pygame
import pygame.midi
pygame.init()
pygame.midi.init()
in_port = pygame.midi.get_default_input_id()
port = pygame.midi.get_default_output_id()
reading = in_port.pygame.midi.read()
check = reading.midi.poll()
pygame.midi.quit()
谁能解释一下为什么 PyCharm 无法识别 pygame.midi?
【问题讨论】:
-
你必须展示一些代码。你想做什么?
标签: python pygame pycharm midi