File "C:\Users\Administrator\Documents\Mibot\oops\blinkserv.py", line 82, in __init__
self.serv = socket(AF_INET,SOCK_STREAM)
TypeError: 'module' object is not callable
I don't know why this error is occurring in that line.
I think everyone used to write like that, but why can't I just run my code?
python socket
Socket is a module that contains a socket class. An error occurs because the module cannot be called by itself.
Seems like you're not equally the code, and other we'll probably see that you've called"Everyone's so old, you seem to be" a close look at the code
.from socket import socket
It would have started with
import socket
I think so.
From the code
If you use one of the two to fix it, it will work normally.
© 2024 OneMinuteCode. All rights reserved.