galacticwarrior9 / IslamBot

A Discord bot that supports Qur'an, hadith, prayer times, tafsir and more.
GNU General Public License v3.0
87 stars 36 forks source link

Bug: /biography name: عبد الله بن عباس #59

Closed itzmk21 closed 1 year ago

itzmk21 commented 1 year ago

/biography name: عبد الله بن عباس gives this error:

Traceback (most recent call last):
  File "/home/mk/Documents/Files/Projects/Discord Bots/IslamBot/venv/lib/python3.10/site-packages/discord/app_commands/commands.py", line 850, in _do_call
    return await self._callback(self.binding, interaction, **params)  # type: ignore
  File "/home/mk/Documents/Files/Projects/Discord Bots/IslamBot/hadith/transmitter_biographies.py", line 52, in biography
    await self._biography(interaction, name)
  File "/home/mk/Documents/Files/Projects/Discord Bots/IslamBot/hadith/transmitter_biographies.py", line 19, in _biography
    soup = await get_site_source(BIOGRAPHY_URL.format(name))
  File "/home/mk/Documents/Files/Projects/Discord Bots/IslamBot/utils/utils.py", line 90, in get_site_source
    text = await resp.read()
  File "/home/mk/Documents/Files/Projects/Discord Bots/IslamBot/venv/lib/python3.10/site-packages/aiohttp/client_reqrep.py", line 1036, in read
    self._body = await self.content.read()
  File "/home/mk/Documents/Files/Projects/Discord Bots/IslamBot/venv/lib/python3.10/site-packages/aiohttp/streams.py", line 375, in read
    block = await self.readany()
  File "/home/mk/Documents/Files/Projects/Discord Bots/IslamBot/venv/lib/python3.10/site-packages/aiohttp/streams.py", line 397, in readany
    await self._wait("readany")
  File "/home/mk/Documents/Files/Projects/Discord Bots/IslamBot/venv/lib/python3.10/site-packages/aiohttp/streams.py", line 304, in _wait
    await waiter
aiohttp.client_exceptions.ClientPayloadError: Response payload is not completed

The ClientPayloadError is raised from this line text = await resp.read().

I suspect this has to do with the actual website /biography name: آدم بن سليمان مولى خالد بن خالد works perfectly though.

itzmk21 commented 1 year ago

It works now.