Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to import socketserver in Python 2.7 #83

Open
iliyas18 opened this issue Jan 28, 2020 · 1 comment
Open

Failed to import socketserver in Python 2.7 #83

iliyas18 opened this issue Jan 28, 2020 · 1 comment
Labels

Comments

@iliyas18
Copy link

iliyas18 commented Jan 28, 2020

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
Copy link
Collaborator

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.

@OrangeTux OrangeTux changed the title Libraries error Failed to import socketserver in Python 2.7 Jan 29, 2020
swipswaps added a commit to swipswaps/knocker that referenced this issue Dec 6, 2020
'sockerserver' fails on systems without Python3:
# python example_server.py
Traceback (most recent call last):
  File "example_server.py", line 1, in <module>
    import socketserver
ImportError: No module named socketserver
//note
"socketserver doesn't exists(sic) in Python 2.7. In Python 2.7 it is called SocketServer" 
//source: AdvancedClimateSystems/uModbus#83
//see also: https://pymotw.com/2/SocketServer/
#swipswaps
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants