TypeError: 'module' object is not callable

it keeps coming up with this error
client = socket(socket.AF_INET, socket.SOCK_STREAM)
TypeError: ‘module’ object is not callable

Are you using python? This may help:

i am using python
and its now coming up with this error
in
server.bind((bind_ip,bind_port))
File “/usr/lib/python2.7/socket.py”, line 228, in meth
return getattr(self._sock,name)(*args)
socket.error: [Errno 99] Cannot assign requested address

This error occurs when the python compiler gets confused between function name and module name and try to run a module name as a function. This error statement TypeError: ‘module’ object is not callable is raised as you are being confused about the Class name and Module name. The problem is in the import line . You are importing a module, not a class. This happend because the module name and class name have the same name .

If you have a class MyClass in a file called MyClass.py , then you should write:

from MyClass import MyClass

In Python , a script is a module, whose name is determined by the filename . So when you start out your file MyClass.py with import MyClass you are creating a loop in the module structure. Also, note that this usually happens when you import any kind of module as a function.