File \"C:\\Users\\Administrator\\Documents\\Mibot\\oops\\blinkserv.py\", line 82, in __init__
self.serv = socket(AF_INET,SOCK_STREAM)
TypeError: \'module\' objec
It seems like what you've done is imported the socket
module as import socket
. Therefore socket
is the module. You either need to change that line to self.serv = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
, as well as every other use of the socket
module, or change the import statement to from socket import socket
.
Or you've got an import socket
after your from socket import *
:
>>> from socket import *
>>> serv = socket(AF_INET,SOCK_STREAM)
>>> import socket
>>> serv = socket(AF_INET,SOCK_STREAM)
Traceback (most recent call last):
File "", line 1, in
TypeError: 'module' object is not callable