NMisko / monkalot

A Twitch Bot for maximum user interaction and chat spam induction.
MIT License
17 stars 8 forks source link

TypeError in speech.py #38

Closed NMisko closed 6 years ago

NMisko commented 6 years ago

Unhandled Error Traceback (most recent call last): File "/usr/lib/python3.4/threading.py", line 920, in _bootstrap_inner self.run() File "/usr/lib/python3.4/threading.py", line 868, in run self._target(*self._args, self._kwargs) File "/usr/local/lib/python3.4/dist-packages/twisted/_threads/_threadworker.py", line 46, in work task() File "/usr/local/lib/python3.4/dist-packages/twisted/_threads/_team.py", line 190, in doWork task() --- --- File "/usr/local/lib/python3.4/dist-packages/twisted/python/threadpool.py", line 250, in inContext result = inContext.theWork() File "/usr/local/lib/python3.4/dist-packages/twisted/python/threadpool.py", line 266, in inContext.theWork = lambda: context.call(ctx, func, *args, *kw) File "/usr/local/lib/python3.4/dist-packages/twisted/python/context.py", line 122, in callWithContext return self.currentContext().callWithContext(ctx, func, args, kw) File "/usr/local/lib/python3.4/dist-packages/twisted/python/context.py", line 85, in callWithContext return func(*args,**kw) File "/home/monkalot/monkalot/bot/commands/speech.py", line 27, in getReply bot.write("@" + user + " " + output) builtins.TypeError: Can't convert 'NoneType' object to str implicitly

CodeMonkey3451 commented 6 years ago

Happened when there was no reply from Cleverbot API. Fixed with commit https://github.com/NMisko/monkalot/commit/07a7ad0edbe89758c5ae335411b7a708687edea6