superquadratic / rtmidi-python

Python wrapper for RtMidi
MIT License
56 stars 2 forks source link

Type error with python3 #17

Open maowlmad opened 9 years ago

maowlmad commented 9 years ago

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 ?

sehqlr commented 9 years ago

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')

maowlmad commented 8 years ago

Thank you that works !