I have been attempting to use a python program called chatbot1.5.2b. It is designed to work on Wikia. However, after following all the steps, I come across this error when I run the startup script:
Exception in thread Thread-1: Traceback (most recent call last):
File "C:\Python27\lib\threading.py", line 810, in __bootstrap_inner
self.run()
File "C:\Python27\lib\site-packages\chatbot.py", line 405, in run
connect = self.c.connection()
File "C:\Python27\lib\site-packages\chatbot.py", line 361, in connection
var = self.__connection(self.settings, self.xhr)
File "C:\Python27\lib\site-packages\chatbot.py", line 348, in __connection
str(settings['room']) + "&t=" +
TypeError: coercing to Unicode: need string or buffer, NoneType found
I am using Python 2.7.8. I have read several other questions on here on very similar topics, but if I try and follow them, such as by putting str() around the "&t=", it gives exactly the same error, except that it displays the code with str("&t=") instead.
Here is the code for the area around line 348 in chatbot.py:
data = self.session.get("http://" + settings["host"] + ":" +
settings["port"] +
"/socket.io/1/xhr-polling/" + xhr_polling
+ "?name=" + self.username + "&key=" +
settings['chatkey'] + "&roomId=" +
str(settings['room']) + "&t=" +
time)
content = re.findall(r'.:::(.*)', data.content.decode('utf8'))
Any help greatly appreciated. I'm not very familiar with Python, so I might be doing something really stupid.
str(setting['room'])? andtime? - fredtantini