ben soketPython yapamaz
aktarırken ancak bir sorun haline runnning ediyorum, bir IRC seğirme bot yapmaya çalışıyorum ben programı çalıştırmak her bir hata alıyorum: Burada
TypeError: 'module' object is not callable
burada
Traceback (most recent call last):
File "C:\VERYLONGPATH\ChatBot\run.py", line 6, in <module>
s = openSocket()
File "C:\VERYLONGPATH\ChatBot\socket.py", line 5, in openSocket
s = socket.socket()
Ve gerçek piton kodu edilir: traceback olan
run.py
from socket import openSocket
from initialize import joinRoom
s = openSocket()
joinRoom(s)
while True:
presist = True
socket.py
import socket
from settings import HOST, PORT, PASS, ID, CHANNEL
def openSocket():
s = socket.socket()
s.connect((HOST, PORT))
s.send("PASS " + PASS + "\r\n")
s.send("NICK " + ID + "\r\n")
s.send("JOIN #" + CHANNEL + "\r\n")
return s
ben soket ithal ediyorum gibi bu hataya neden ne olabilir emin değilim. Python size from socket import openSocket
ne zaman hangi socket
anlamında karıştı oluyor böylece
bir şey olduğunu ne tür bir bağlantı kuramazdınız SOCK_STREAM, AF_INET – Jonathan