Skip to content

Exception on youtube request #99

@LordAro

Description

@LordAro

Exception on youtube request without an API key

[2015/05/15 17:41:36] (I:csbot.pretty_log) [#ury] <LordAro> https://youtu.be/gakJlr3GecE
[2015/05/15 17:41:36] (I:googleapiclient.discovery) URL being requested: GET https://www.googleapis.com/youtube/v3/videos?alt=json&part=snippet%2CcontentDetails%2Cstatistics&id=gakJlr3GecE
[2015/05/15 17:41:36] (E:asyncio) Exception in callback <bound method _SelectorSocketTransport._read_ready of <asyncio.selector_events._SelectorSocketTransport object at 0x808ac61d0>>()
handle: Handle(<bound method _SelectorSocketTransport._read_ready of <asyncio.selector_events._SelectorSocketTransport object at 0x808ac61d0>>, ())
Traceback (most recent call last):
  File "/home/urybot/.pyenv/versions/3.4.1/lib/python3.4/asyncio/events.py", line 39, in _run
    self._callback(*self._args)
  File "/home/urybot/.pyenv/versions/3.4.1/lib/python3.4/asyncio/selector_events.py", line 473, in _read_ready
    self._protocol.data_received(data)
  File "/home/urybot/csbot/csbot/irc.py", line 297, in data_received
    self.line_received(self.codec.decode(line))
  File "/home/urybot/csbot/csbot/core.py", line 224, in line_received
    super().line_received(line)
  File "/home/urybot/csbot/csbot/irc.py", line 303, in line_received
    self.message_received(msg)
  File "/home/urybot/csbot/csbot/irc.py", line 307, in message_received
    self._dispatch_method('irc_' + msg.command_name, msg)
  File "/home/urybot/csbot/csbot/irc.py", line 580, in _dispatch_method
    method(*args, **kwargs)
  File "/home/urybot/csbot/csbot/irc.py", line 491, in irc_PRIVMSG
    self.on_privmsg(user, channel, message)
  File "/home/urybot/csbot/csbot/core.py", line 242, in on_privmsg
    'reply_to': user.nick if channel == self.nick else channel,
  File "/home/urybot/csbot/csbot/core.py", line 200, in emit_new
    self.bot.post_event(event)
  File "/home/urybot/csbot/csbot/core.py", line 86, in post_event
    self.events.post_event(event)
  File "/home/urybot/csbot/csbot/events.py", line 57, in post_event
    self.handle_event(e)
  File "/home/urybot/csbot/csbot/plugin.py", line 95, in f
    getattr(p, name)(*args)
  File "/home/urybot/csbot/csbot/plugin.py", line 263, in fire_hooks
    f(self, event)
  File "/home/urybot/csbot/csbot/plugins/linkinfo.py", line 152, in scan_privmsg
    result = self.get_link_info(part)
  File "/home/urybot/csbot/csbot/plugins/linkinfo.py", line 186, in get_link_info
    result = h.handler(url, match)
  File "/home/urybot/csbot/csbot/plugins/youtube.py", line 128, in page_handler
    response = self._yt(url)
  File "/home/urybot/csbot/csbot/plugins/youtube.py", line 65, in _yt
    json = self.get_video_json(vid_id)
  File "/home/urybot/csbot/csbot/plugins/youtube.py", line 52, in get_video_json
    response = self.client.videos().list(id=id, part='snippet,contentDetails,statistics').execute(http=self.http)
  File "/home/urybot/.pyenv/versions/csbot/lib/python3.4/site-packages/oauth2client/util.py", line 137, in positional_wrapper
    return wrapped(*args, **kwargs)
  File "/home/urybot/.pyenv/versions/csbot/lib/python3.4/site-packages/googleapiclient/http.py", line 729, in execute
    raise HttpError(resp, content, uri=self.uri)
googleapiclient.errors.HttpError: <unprintable HttpError object>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions