mirror of https://github.com/miaowware/qrm2.git
Fix aiohttp/apache http2 bug in ?muf and ?fof2
For more info, https://github.com/aio-libs/aiohttp/issues/3904 It is not possible to fix it by bumping aiohttp since it is pinned by another dependency.
This commit is contained in:
parent
68eaeff476
commit
e2d1d1fc87
|
@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||||
|
|
||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
### Fixed
|
||||||
|
- Issue where `?muf` and `?fof2` would fail with an aiohttp error.
|
||||||
|
|
||||||
|
|
||||||
## [2.7.5] - 2022-06-08
|
## [2.7.5] - 2022-06-08
|
||||||
|
|
|
@ -33,7 +33,7 @@ class PropagationCog(commands.Cog):
|
||||||
async def mufmap(self, ctx: commands.Context):
|
async def mufmap(self, ctx: commands.Context):
|
||||||
"""Shows a world map of the Maximum Usable Frequency (MUF)."""
|
"""Shows a world map of the Maximum Usable Frequency (MUF)."""
|
||||||
async with ctx.typing():
|
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()
|
svg = await r.read()
|
||||||
out = BytesIO(cairosvg.svg2png(bytestring=svg))
|
out = BytesIO(cairosvg.svg2png(bytestring=svg))
|
||||||
file = discord.File(out, "muf_map.png")
|
file = discord.File(out, "muf_map.png")
|
||||||
|
@ -47,7 +47,7 @@ class PropagationCog(commands.Cog):
|
||||||
async def fof2map(self, ctx: commands.Context):
|
async def fof2map(self, ctx: commands.Context):
|
||||||
"""Shows a world map of the Critical Frequency (foF2)."""
|
"""Shows a world map of the Critical Frequency (foF2)."""
|
||||||
async with ctx.typing():
|
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()
|
svg = await r.read()
|
||||||
out = BytesIO(cairosvg.svg2png(bytestring=svg))
|
out = BytesIO(cairosvg.svg2png(bytestring=svg))
|
||||||
file = discord.File(out, "fof2_map.png")
|
file = discord.File(out, "fof2_map.png")
|
||||||
|
|
Loading…
Reference in New Issue