3

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.

Aviv Cohn
  • 15,543
  • 25
  • 68
  • 131

1 Answers1

0

You don't even have to set the RtMidi backend as it is the default, see mido backend documentation

hfmanson
  • 1,446
  • 14
  • 21