简体   繁体   中英

“PortMidi: `Bad pointer'” when closing mido port

My code:

import mido
import time

mido.set_backend('mido.backends.pygame')

output = mido.open_output()
output.send(mido.Message('note_on', note=64, velocity=60))
time.sleep(3)
output.close()

After the last line, the following error is printed:

Exception Exception: "PortMidi: `Bad pointer'" in <pypm.Output object at 0x025FF0B0> ignored

Apart from that, everything seems to work fine. However I'm developing a console app and this output is annoying. How can I get rid of this error?

I am using Windows 7 and Python 2.7.

您甚至不必设置RtMidi后端,因为它是默认设置,请参阅mido后端文档

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM