diff --git a/CHANGELOG.md b/CHANGELOG.md index dd062bb..234f5d9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## [Unreleased] +### Fixed +- Issue where `?muf` and `?fof2` would fail with an aiohttp error. ## [2.7.5] - 2022-06-08 diff --git a/exts/propagation.py b/exts/propagation.py index e46ad7d..f7a68e4 100644 --- a/exts/propagation.py +++ b/exts/propagation.py @@ -33,7 +33,7 @@ class PropagationCog(commands.Cog): async def mufmap(self, ctx: commands.Context): """Shows a world map of the Maximum Usable Frequency (MUF).""" async with ctx.typing(): - async with self.session.get(self.muf_url) as r: + async with self.session.get(self.muf_url, headers={"Connection": "Upgrade", "Upgrade": "http/1.1"}) as r: svg = await r.read() out = BytesIO(cairosvg.svg2png(bytestring=svg)) file = discord.File(out, "muf_map.png") @@ -47,7 +47,7 @@ class PropagationCog(commands.Cog): async def fof2map(self, ctx: commands.Context): """Shows a world map of the Critical Frequency (foF2).""" async with ctx.typing(): - async with self.session.get(self.fof2_url) as r: + async with self.session.get(self.fof2_url, headers={"Connection": "Upgrade", "Upgrade": "http/1.1"}) as r: svg = await r.read() out = BytesIO(cairosvg.svg2png(bytestring=svg)) file = discord.File(out, "fof2_map.png")