rtmidi-python icon indicating copy to clipboard operation
rtmidi-python copied to clipboard

Type error with python3

Open maowlmad opened this issue 10 years ago • 2 comments

Hi, First I would like to thank you for this wonderful project. I'm just learning python and I'm writing a script which enable a complete control of the Novation Launchpad S midi-controller's lights on Linux. The rtmidi-python module works with python 2.7. But I've an issue with python 3.2 when creating the MidiOut / MidiIn object :

import rtmidi_python as rtmidi midi_out = rtmidi.MidiOut() Traceback (most recent call last): File "", line 1, in File "rtmidi_python.pyx", line 111, in rtmidi_python.MidiOut.cinit (rtmidi_python.cpp:2088) TypeError: expected bytes, str found

What I have to do ?

maowlmad avatar Jan 22 '15 19:01 maowlmad

I don't know how to fix this in the code, but I figured out a workaround. Try this: midi_out = rtmidi.MidiOut(b'out')

sehqlr avatar Aug 07 '15 22:08 sehqlr

Thank you that works !

maowlmad avatar Jan 14 '16 03:01 maowlmad