Discussion:
[Twisted-Python] Twisted serialport
Chris West
2016-03-09 09:53:18 UTC
Permalink
I'm currently using the SerialPort connection type in twisted 15.5.0 with python 2.7.7 on a windows machine.

Twisted serial communications with the serial port fail when pyserial is upgraded from 2.7 to 3.0.1 and fails with the following error.

Traceback (most recent call last):
File "C:\Anaconda\Scripts\fmv3dbg-script.py", line 9, in <module>
load_entry_point('fmv3tools==0.2.5', 'console_scripts', 'fmv3dbg')()
File "C:\Anaconda\lib\site-packages\fmv3tools-0.2.5-py2.7.egg\fmv3tools\fmv3dbg.py", line 338, in main
server = create_system(args)
File "C:\Anaconda\lib\site-packages\fmv3tools-0.2.5-py2.7.egg\fmv3tools\fmv3dbg.py", line 310, in create_system
server = SerialServer(com_port, outputs=outputs)
File "C:\Anaconda\lib\site-packages\fmv3tools-0.2.5-py2.7.egg\fmv3tools\fmv3dbg.py", line 57, in __init__
FMv3SerialGateway.__init__(self, com_port, *args, **kwargs)
File "C:\Anaconda\lib\site-packages\flatmesh-0.2.8-py2.7.egg\flatmesh\fmv3_datacoms.py", line 403, in __init
__
baudrate=baudrate)
File "C:\Anaconda\lib\site-packages\twisted-15.5.0-py2.7-win32.egg\twisted\internet\_win32serialport.py", line 56, in __init__
self._finishPortSetup()
File "C:\Anaconda\lib\site-packages\twisted-15.5.0-py2.7-win32.egg\twisted\internet\_win32serialport.py", line 65, in _finishPortSetup
flags, comstat = win32file.ClearCommError(self._serial.hComPort)
AttributeError: 'Serial' object has no attribute 'hComPort'

I've removed pyserial 3.0.1 from my system for the moment but I was wondering if there is a way to have both pyserial 2.7 and 3.0.1 on my system when using twisted?

Thanks,
Chris
Adi Roiban
2016-03-09 09:59:21 UTC
Permalink
I’m currently using the SerialPort connection type in twisted 15.5.0 with
python 2.7.7 on a windows machine.
Twisted serial communications with the serial port fail when pyserial is
upgraded from 2.7 to 3.0.1 and fails with the following error.
Hi,

I think that this is a know issue.

Please see https://twistedmatrix.com/trac/ticket/8159

It would help if you could try the patch and report that all is ok for your
use case.

If not the same issue, please report a new ticket.

Regards
--
Adi Roiban
Chris West
2016-03-10 08:37:02 UTC
Permalink
Adi,

Thanks for the reply, I've applied the patch and that has sorted out my problem.

Many thanks,
Chris

Date: Wed, 9 Mar 2016 09:59:21 +0000
From: Adi Roiban <***@roiban.ro>
To: Twisted general discussion <twisted-***@twistedmatrix.com>
Subject: Re: [Twisted-Python] Twisted serialport
Message-ID:
<CAFycZ9eOtEG6uUn=+5zP78wSLSiroHbP-***@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
I?m currently using the SerialPort connection type in twisted 15.5.0
with python 2.7.7 on a windows machine.
Twisted serial communications with the serial port fail when pyserial
is upgraded from 2.7 to 3.0.1 and fails with the following error.
Hi,

I think that this is a know issue.

Please see https://twistedmatrix.com/trac/ticket/8159

It would help if you could try the patch and report that all is ok for your use case.

If not the same issue, please report a new ticket.

Regards
--
Adi Roiban
Glyph Lefkowitz
2016-03-10 19:07:58 UTC
Permalink
Post by Chris West
Adi,
Thanks for the reply, I've applied the patch and that has sorted out my problem.
Would you mind putting a comment on a ticket to that effect?

-glyph

Loading...