if parsed[0][1] IndexError??
L1ght5h0w opened this issue · 2 comments
L1ght5h0w commented
The script file I have is pretty much the same as frost.py except my token, but I get the following error:
Ignoring exception in on_message
Traceback (most recent call last):
File "C:\Users\User\AppData\Local\Programs\Python\Python35-32\lib\site-packages\discord\client.py", line 307, in _run_event
yield from getattr(self, event)(*args, **kwargs)
File "C:\Users\User\AppData\Local\Programs\Python\Python35-32\frost5.py", line 22, in on_message
await client.send_message(message.channel, cb.ask(message.content.replace(message.server.me.mention, '')) )
File "C:\Users\User\AppData\Local\Programs\Python\Python35-32\lib\site-packages\cleverbot\cleverbot.py", line 104, in ask
parsed = self._parse(resp.text)
File "C:\Users\User\AppData\Local\Programs\Python\Python35-32\lib\site-packages\cleverbot\cleverbot.py", line 156, in _parse
if parsed[0][1] == 'DENIED':
IndexError: list index out of range
L1ght5h0w commented
Nvm. Fixed by changing cleverbot.py
Anyone else who has this issue:
The fix can be done by changing the RESOURCE = "/webservicemin?uc=321&"
line to RESOURCE = "/webservicemin?uc=3210&botapi=[YOUR_API_NAME]"
where you put a new name instead of [YOUR_API_NAME]
.
jagrosh commented
You can also just update the cleverbot module for the same fix