IRC bot written in python : TypeError: string or unicode text buffer expected, not NoneType -




i'm getting following error message code:

traceback (most recent call last):   file "bot.py", line 21, in <module>     ircsock.connect((irc_server, port)) # here connect irc server typeerror: string or unicode text buffer expected, not nonetype 

here's source code written in python:

import socket import string  ircsock = socket.socket(socket.af_inet, socket.sock_stream) irc_server = raw_input("enter irc server wish connect: ") port = raw_input("enter irc server port: ") nick = raw_input("enter irc nickname of bot: ") channel = raw_input("enter irc channel bot join, don't forget add # before name: ") ident = 'bot' realname = 'syrius b0t'  ircsock.connect((irc_server, port)) # here connect irc server ircsock.send(bytes("user "+ ident +" "+ ident +" "+ ident + " " + ident + "\n", "utf-8")) #we filling out form line , saying set fields bot nickname. ircsock.send(bytes("nick "+ nick +"\n", "utf-8")) # assign nickname irc bot 

any appreciated.

thanks.





wiki

Comments

Popular posts from this blog

Asterisk AGI Python Script to Dialplan does not work -

python - Read npy file directly from S3 StreamingBody -

kotlin - Out-projected type in generic interface prohibits the use of metod with generic parameter -