I have been having this issue (maybe non-issue) for some time.
Here is my set up:
Teensy 2.0 MIDI Device
Pd 0.46.7
Late 2013 Macbook Pro
I am using a Teensy MIDI device in Pd.
If I connect the Teensy device, then launch Pd, I get the following error message:
could not open midi input 0 (Teensy MIDI): PortMidi: 'Invalid device ID'
could not open midi output 1 (Teensy MIDI): PortMidi: 'Invalid device ID'
Under my MIDI settings I have "Teensy MIDI" selected both as my input and output.
If I re-select "Teensy MIDI" in both dialogs of the MIDI preferences menu, and hit OK the same error message will reappear in Pd's print window.
Though I get this error, it seems to not effect the use of the device in any way.
When I connect the device to a windows machine, I don't have this PortMidi error message.
I have also connected this device to my iPhone using MobMuPlat, no issues.
Any advice would be helpful.