← Back to team overview

touch-packages team mailing list archive

[Bug 1501240] Re: Serialport doens't work correctly after ubuntu update?

 

I updated yesterday and got this issue afterwards.

I tried the following workaround with worked for me :

--- serialposix.py.stock    2015-10-03 06:53:45.241261071 -0700 
+++ serialposix.py  2015-10-03 06:55:07.481262475 -0700
@@ -457,7 +457,11 @@
             # Disconnected devices, at least on Linux, show the
             # behavior that they are always ready to read immediately
             # but reading returns nothing.
-                raise SerialException('device reports readiness to read but returned no data (device disconnected?)')
+                # retrying the read seems to get me past this error:
+                # [ERROR] Can't read from printer (disconnected?)     (SerialException): device reports readiness to read but returned no data (device disconnected?)
+
+                #raise SerialException('device reports readiness to read but returned no data (device disconnected?)')
+                pass


see https://superuser.com/questions/979722/serialport-doenst-work-correctly-after-ubuntu-update#

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to python2.7 in Ubuntu.
https://bugs.launchpad.net/bugs/1501240

Title:
  Serialport doens't work correctly after ubuntu update?

Status in python2.7 package in Ubuntu:
  Confirmed

Bug description:
  I have a strange problem with my serial port. It seems that sth has changed after ubuntu updates and reboot. 
  When I try to open serial port in python I get exception: 

  'device reports readiness to read but returned no data (device
  disconnected or multiple access on port?)'

  przem@przem:~/Pulpit/bat/scripts$ python
  Python 2.7.6 (default, Jun 22 2015, 17:58:13) 
  [GCC 4.8.2] on linux2
  Type "help", "copyright", "credits" or "license" for more information.
  >>> import serial
  >>> ser = serial.Serial("/dev/ttyUSB0", 57600)
  >>> ser.read()
  Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    File "/usr/local/lib/python2.7/dist-packages/serial/serialposix.py", line 475, in read
      raise SerialException('device reports readiness to read but returned no data (device disconnected or multiple access on port?)')
  serial.serialutil.SerialException: device reports readiness to read but returned no data (device disconnected or multiple access on port?)
  >>> 

  I know that there are also different users who has this problem. 
  more info:
  http://superuser.com/questions/979722/serialport-doenst-work-correctly-after-ubuntu-update

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python2.7/+bug/1501240/+subscriptions


References