TypeError: 'module' object is not callable

前端 未结 11 1823
耶瑟儿~
耶瑟儿~ 2020-11-22 12:06
File \"C:\\Users\\Administrator\\Documents\\Mibot\\oops\\blinkserv.py\", line 82, in __init__
    self.serv = socket(AF_INET,SOCK_STREAM)
TypeError: \'module\' objec         


        
11条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-11-22 12:17

    A simple way to solve this problem is export thePYTHONPATH variable enviroment. For example, for Python 2.6 in Debian/GNU Linux:

    export PYTHONPATH=/usr/lib/python2.6`
    

    In other operating systems, you would first find the location of this module or the socket.py file.

提交回复
热议问题