{"action":"created","issue":{"url":"https://api.github.com/repos/Rapptz/discord.py/issues/329","repository_url":"https://api.github.com/repos/Rapptz/discord.py","labels_url":"https://api.github.com/repos/Rapptz/discord.py/issues/329/labels{/name}","comments_url":"https://api.github.com/repos/Rapptz/discord.py/issues/329/comments","events_url":"https://api.github.com/repos/Rapptz/discord.py/issues/329/events","html_url":"https://github.com/Rapptz/discord.py/issues/329","id":176984192,"number":329,"title":"\"Unclosed client session\" error","user":{"login":"AMVPh34r","id":183733,"avatar_url":"https://avatars.githubusercontent.com/u/183733?v=3","gravatar_id":"","url":"https://api.github.com/users/AMVPh34r","html_url":"https://github.com/AMVPh34r","followers_url":"https://api.github.com/users/AMVPh34r/followers","following_url":"https://api.github.com/users/AMVPh34r/following{/other_user}","gists_url":"https://api.github.com/users/AMVPh34r/gists{/gist_id}","starred_url":"https://api.github.com/users/AMVPh34r/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AMVPh34r/subscriptions","organizations_url":"https://api.github.com/users/AMVPh34r/orgs","repos_url":"https://api.github.com/users/AMVPh34r/repos","events_url":"https://api.github.com/users/AMVPh34r/events{/privacy}","received_events_url":"https://api.github.com/users/AMVPh34r/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2016-09-14T18:30:05Z","updated_at":"2016-09-14T18:37:59Z","closed_at":null,"body":"I searched around a bit and saw some similar issues but the most definitive answer seemed to be \"there's an error in your bot's code.\" However I'm getting this error even trying to run the example programs provided in the repository (edit: looking at it now it seems to be due to the TypeError in gateway.py). Here's the traceback:\r\n```\r\nTraceback (most recent call last):\r\n  File \"./sample.py\", line 67, in <module>\r\n    bot.run(TOKEN)\r\n  File \"/home/alex/.local/lib/python3.5/site-packages/discord/client.py\", line 487, in run\r\n    self.loop.run_until_complete(self.start(*args, **kwargs))\r\n  File \"/usr/lib/python3.5/asyncio/base_events.py\", line 387, in run_until_complete\r\n    return future.result()\r\n  File \"/usr/lib/python3.5/asyncio/futures.py\", line 274, in result\r\n    raise self._exception\r\n  File \"/usr/lib/python3.5/asyncio/tasks.py\", line 239, in _step\r\n    result = coro.send(None)\r\n  File \"/home/alex/.local/lib/python3.5/site-packages/discord/client.py\", line 459, in start\r\n    yield from self.connect()\r\n  File \"/home/alex/.local/lib/python3.5/site-packages/discord/client.py\", line 412, in connect\r\n    self.ws = yield from DiscordWebSocket.from_client(self)\r\n  File \"/home/alex/.local/lib/python3.5/site-packages/discord/gateway.py\", line 174, in from_client\r\n    ws = yield from websockets.connect(gateway, loop=client.loop, klass=cls)\r\n  File \"/home/alex/.local/lib/python3.5/site-packages/websockets/py35/client.py\", line 19, in __await__\r\n    return (yield from self.client)\r\n  File \"/home/alex/.local/lib/python3.5/site-packages/websockets/client.py\", line 160, in connect\r\n    factory, wsuri.host, wsuri.port, **kwds)\r\n  File \"/usr/lib/python3.5/asyncio/base_events.py\", line 713, in create_connection\r\n    sock, protocol_factory, ssl, server_hostname)\r\n  File \"/usr/lib/python3.5/asyncio/base_events.py\", line 725, in _create_connection_transport\r\n    protocol = protocol_factory()\r\n  File \"/home/alex/.local/lib/python3.5/site-packages/websockets/client.py\", line 156, in <lambda>\r\n    loop=loop, legacy_recv=legacy_recv,\r\n  File \"/home/alex/.local/lib/python3.5/site-packages/discord/gateway.py\", line 158, in __init__\r\n    super().__init__(*args, max_size=None, **kwargs)\r\nTypeError: __init__() got multiple values for keyword argument 'max_size'\r\nUnclosed client session\r\nclient_session: <aiohttp.client.ClientSession object at 0x7fd109f74f98>\r\n```\r\nI'm not entirely sure what causes the \"__init__() got multiple values for keyword argument 'max_size'\" error but that seems to be breaking things.\r\nI can provide any other needed info but to answer the general questions: I'm running python 3.5, have all the listed requirements installed, and copy-pasted the \"basic_bot\" example verbatim, only adding in my token as a constant and passing that to `bot.run()` instead."},"comment":{"url":"https://api.github.com/repos/Rapptz/discord.py/issues/comments/247112811","html_url":"https://github.com/Rapptz/discord.py/issues/329#issuecomment-247112811","issue_url":"https://api.github.com/repos/Rapptz/discord.py/issues/329","id":247112811,"user":{"login":"AMVPh34r","id":183733,"avatar_url":"https://avatars.githubusercontent.com/u/183733?v=3","gravatar_id":"","url":"https://api.github.com/users/AMVPh34r","html_url":"https://github.com/AMVPh34r","followers_url":"https://api.github.com/users/AMVPh34r/followers","following_url":"https://api.github.com/users/AMVPh34r/following{/other_user}","gists_url":"https://api.github.com/users/AMVPh34r/gists{/gist_id}","starred_url":"https://api.github.com/users/AMVPh34r/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AMVPh34r/subscriptions","organizations_url":"https://api.github.com/users/AMVPh34r/orgs","repos_url":"https://api.github.com/users/AMVPh34r/repos","events_url":"https://api.github.com/users/AMVPh34r/events{/privacy}","received_events_url":"https://api.github.com/users/AMVPh34r/received_events","type":"User","site_admin":false},"created_at":"2016-09-14T18:37:59Z","updated_at":"2016-09-14T18:37:59Z","body":"`Requirement already up-to-date: websockets==3.1 in /home/alex/.local/lib/python3.5/site-packages`\r\nSeems to be fine there as well, hmm"}}
{"actor":{"display_login":"AMVPh34r"}}