#103 Blocks USB-devices indefinitely on close


I am not sure that the bug is in pyserial, but as I am running out of ideas; I thought it would be best for me to post the bug here.

My computer is Mac Book Pro (model MacBookPro6,2) running Mac OS X 10.6.7. My python version is 2.7.1 and the pyserial version is 2.5. A minimal code example which almost always triggers the bug follows:

ser = serial.Serial('/dev/tty.usbserial', timeout = 1, writeTimeout = 1)
s = ser.read(2)
print s.encode("hex")

The serial device is based on a Prolific Technology rs232<->usb chip.

The result is as follows:
The python interpreter hangs on 'ser.close()' and has the status 'stuck' when running 'top'. The python interpreter is also impossible to kill (even with 'kill -9'). Furthermore, when trying to reboot the system only 'reboot -q' works. The bug also has the nasty side effect of blocking the use of the built-in trackpad and keyboard if plugged into the computer or an external mouse and keyboard if plugged into the external keyboard.


  • Chris Liechti

    Chris Liechti - 2011-08-05

    That looks like a low level driver issue.

    I've used Prolific chips successfully with pySerial (though i do not use write timeout).

  • Chris Liechti

    Chris Liechti - 2011-08-05
    • status: open --> pending-works-for-me
  • Chris Liechti

    Chris Liechti - 2013-10-17
    • status: pending-works-for-me --> closed-works-for-me
    • assigned_to: Chris Liechti
    • Group: --> v2.5
  • Chris Liechti

    Chris Liechti - 2013-10-17

    2.7 released

    please make new report if problem still occurs


Log in to post a comment.