Drummersbrother / rocket-snake

A python async API client for the https://rocketleaguestats.com/ api.
Apache License 2.0
5 stars 1 forks source link

Unable To Connect To RLS API #2

Open cdrch opened 7 years ago

cdrch commented 7 years ago

Received the following error when trying to request a single player's information: aiohttp.errors.ClientOSError: [Errno 101] Cannot connect to host api.rocketleaguestats.com:443 ssl:True [Can not connect to api.rocketleaguestats.com:443 [Network is unreachable]]

Full traceback:

Traceback (most recent call last):
  File "lib/discord/ext/commands/core.py", line 50, in wrapped
    ret = yield from coro(*args, **kwargs)
  File "/home/ubuntu/Red-DiscordBot/cogs/pickups.py", line 55, in signup
    new_player = await self.client.get_player(urlOrName, rs.constants.STEAM)
  File "/usr/local/lib/python3.5/dist-packages/rocket_snake/client.py", line 114, in get_player
    handle_ratelimiting=self.auto_ratelimit)
  File "/usr/local/lib/python3.5/dist-packages/rocket_snake/basic_requests.py", line 152, in decorated_func
    timeout_seconds=timeout_seconds)
  File "/usr/local/lib/python3.5/dist-packages/rocket_snake/basic_requests.py", line 208, in get_player
    **kwargs))[1]
  File "/usr/local/lib/python3.5/dist-packages/rocket_snake/basic_requests.py", line 88, in basic_request
    async with getattr(session, method)(api_url + endpoint, *args, **kwargs) as response:
  File "lib/aiohttp/client.py", line 565, in __aenter__
    self._resp = yield from self._coro
  File "lib/aiohttp/client.py", line 198, in _request
    conn = yield from self._connector.connect(req)
  File "lib/aiohttp/connector.py", line 314, in connect
    .format(key, exc.strerror)) from exc
Borgli commented 7 years ago

Upgrading aiohttp to version 1.1.0 solved this issue for me.

Drummersbrother commented 7 years ago

@cdrch Please make sure you have installed aiohttp 1.1.0, and re-confirm that the issue still exists, as I've not been able to reproduce the issue.

cdrch commented 7 years ago

@Drummersbrother Apologies for the delayed response. I have updated aiottp to version 2.3.2, the latest version. I was unable to install an old version of aiohttp. I received a fairly similar error.

aiohttp.errors.ClientOSError: [Errno 101] Cannot connect to host api.rocketleaguestats.com:80 ssl:False [Can not connect to api.rocketleaguestats.com:80 [Network is unreachable]]

Drummersbrother commented 6 years ago

@cdrch What OS are you using? That error is probably due to broken SSL certificate chains on your local python install.

cdrch commented 6 years ago

Ubuntu 16.04, on Amazon EC2. Honestly not sure how to proceed in order to fix such a problem.