Dec 01 10:29:48 sturtz.cf SturtzBot[1296]: File "/usr/lib/python3/dist-packages/supybot/callbacks.py", line 1300, in callCommand
Dec 01 10:29:48 sturtz.cf SturtzBot[1296]: method(irc, msg, *args, **kwargs)
Dec 01 10:29:48 sturtz.cf SturtzBot[1296]: File "/usr/lib/python3/dist-packages/supybot/commands.py", line 1109, in newf
Dec 01 10:29:48 sturtz.cf SturtzBot[1296]: f(self, irc, msg, args, *state.args, **state.kwargs)
Dec 01 10:29:48 sturtz.cf SturtzBot[1296]: File "/NSCS/bots/plugins/YouTube/plugin.py", line 142, in yt
Dec 01 10:29:48 sturtz.cf SturtzBot[1296]: video_id = self.dosearch(query, msg.channel)
Dec 01 10:29:48 sturtz.cf SturtzBot[1296]: File "/NSCS/bots/plugins/YouTube/plugin.py", line 80, in dosearch
Dec 01 10:29:48 sturtz.cf SturtzBot[1296]: "YouTube: Error retrieving data from API: %s" % request.content.decode()
Dec 01 10:29:48 sturtz.cf SturtzBot[1296]: UnboundLocalError: local variable 'request' referenced before assignment
Dec 01 10:29:48 sturtz.cf SturtzBot[1296]: ERROR 2020-12-01T10:29:48 Exception id: 0xc0473
I'm guessing this happens when utils.web.getUrl(api_url).decode() itself crashes; you should probably move it out of this try block into its own.
Hi, someone on #supybot just posted this error:
I'm guessing this happens when
utils.web.getUrl(api_url).decode()
itself crashes; you should probably move it out of this try block into its own.