[USB] Could not claim interface  on USB device: -6

I have a problem with python multiprocessing and odrive.
My parent process uses 2 odrive:
odrv0 = odrive.find_any(serial_number = “2073399A4D4D”)
odrv1 = odrive.find_any(serial_number = “208339864D4D”)

My child process need to access the odrives so I execute another time:
odrv0 = odrive.find_any(serial_number = “2073399A4D4D”)
odrv1 = odrive.find_any(serial_number = “208339864D4D”)

It was working well with firmware 0.51.
I just upgraded to firmware 0.54 and I get this error when I spawn the child process:
13:48:40.581106970 [USB] Could not claim interface on USB device: -6
13:48:40.581647970 [USB] Could not claim interface on USB device: -6

Could you please help me fixing that error or finding a workaround?

I already tried to pass odrv0 and odrv1 in multiprocess queue, but it doesn’t work.
I already checked support on github and found that it is supposed to be fixed: rewrite find_any() to support multiple calls · odriverobotics/ODrive@6a9bc83 · GitHub

thank you for your help.

Accessing ODrives from multiple processes is currently unfortunately not supported. I’m not too familiar with Python’s multiprocessing but maybe you can reorganize your code so that the ODrive I/O is all in one process.

1 Like

Hi Samuel,
Thank you for your answer.
Do you plan to add this python multiprocess functionality in a near future?

Redeclaring odrive in different processes was working ok in fw 0.51dev.
Do you know why?