AdvancedClimateSystems / uModbus

Python implementation of the Modbus protocol.
Mozilla Public License 2.0
211 stars 81 forks source link

Failed to import socketserver in Python 2.7 #83

Open iliyas18 opened 4 years ago

iliyas18 commented 4 years ago

Hello, I'm using python 2.7 in ubuntu and I'm creating a modbus TCP server while running the code for modbus TCP. I'm getting an error i.e

File "modbus.py", line 4, in <module>
    from socketserver import TCPServer
ImportError: No module named socketserver
OrangeTux commented 4 years ago

Hello, first of all I highly recommend to update to a more recent version of Python because Python 2.7 has reached EOL. That means that this version is not supported anymore by the Python Foundation and it won't receive any updates anymore.

Second socketserver doesn't exists in Python 2.7. In Python 2.7 it is called SocketServer.