Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AssertionError on client side after bot restart | Sometimes it is a RuntimeError #11

Closed
FightMan01 opened this issue Oct 29, 2021 · 4 comments

Comments

@FightMan01
Copy link

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/quart/app.py", line 1467, in handle_request
    return await self.full_dispatch_request(request_context)
  File "/usr/local/lib/python3.8/dist-packages/quart/flask_patch/app.py", line 26, in new_full_dispatch_request
    return await old_full_dispatch_request(self, request_context)
  File "/usr/local/lib/python3.8/dist-packages/quart/app.py", line 1492, in full_dispatch_request
    result = await self.handle_user_exception(error)
  File "/usr/local/lib/python3.8/dist-packages/quart/app.py", line 968, in handle_user_exception
    raise error
  File "/usr/local/lib/python3.8/dist-packages/quart/app.py", line 1490, in full_dispatch_request
    result = await self.dispatch_request(request_context)
  File "/usr/local/lib/python3.8/dist-packages/quart/app.py", line 1536, in dispatch_request
    return await self.ensure_async(handler)(**request_.view_args)
  File "/home/Fightman01Bot/dash/main.py", line 1352, in generateweb
    user_ids_json = await ipc_client.request("get_user", payload=x)
  File "/usr/local/lib/python3.8/dist-packages/nextcord/ext/ipc/client.py", line 104, in request
    await self.websocket.send_json(payload)
  File "/usr/local/lib/python3.8/dist-packages/aiohttp/client_ws.py", line 160, in send_json
    await self.send_str(dumps(data), compress=compress)
  File "/usr/local/lib/python3.8/dist-packages/aiohttp/client_ws.py", line 148, in send_str
    await self._writer.send(data, binary=False, compress=compress)
  File "/usr/local/lib/python3.8/dist-packages/aiohttp/http_websocket.py", line 649, in send
    await self._send_frame(message, WSMsgType.TEXT, compress)
  File "/usr/local/lib/python3.8/dist-packages/aiohttp/http_websocket.py", line 626, in _send_frame
    await self.protocol._drain_helper()
  File "/usr/local/lib/python3.8/dist-packages/aiohttp/base_protocol.py", line 78, in _drain_helper
    assert waiter is None or waiter.cancelled()
AssertionError
@TAG-Epic TAG-Epic added the bug label Oct 29, 2021
@DenverCoder1
Copy link
Collaborator

DenverCoder1 commented Oct 29, 2021

This seems like an aiohttp issue

@DenverCoder1
Copy link
Collaborator

Relevant PR in aiohttp that fixes this: aio-libs/aiohttp#6028

@FightMan01 FightMan01 changed the title AssertionError on client side after bot restart AssertionError on client side after bot restart | Sometimes it is a RuntimeError Oct 30, 2021
@FightMan01
Copy link
Author

Sometimes I get a RuntimeError as well:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/quart/app.py", line 1467, in handle_request
    return await self.full_dispatch_request(request_context)
  File "/usr/local/lib/python3.8/dist-packages/quart/flask_patch/app.py", line 26, in new_full_dispatch_request
    return await old_full_dispatch_request(self, request_context)
  File "/usr/local/lib/python3.8/dist-packages/quart/app.py", line 1492, in full_dispatch_request
    result = await self.handle_user_exception(error)
  File "/usr/local/lib/python3.8/dist-packages/quart/app.py", line 968, in handle_user_exception
    raise error
  File "/usr/local/lib/python3.8/dist-packages/quart/app.py", line 1490, in full_dispatch_request
    result = await self.dispatch_request(request_context)
  File "/usr/local/lib/python3.8/dist-packages/quart/app.py", line 1536, in dispatch_request
    return await self.ensure_async(handler)(**request_.view_args)
  File "/var/www/fm01.hu/public_html/main.py", line 51, in web_gen
    name = await ipc_client.request("get_guild_name", serverid=row["serverid"])
  File "/usr/local/lib/python3.8/dist-packages/nextcord/ext/ipc/client.py", line 108, in request
    recv = await self.websocket.receive()
  File "/usr/local/lib/python3.8/dist-packages/aiohttp/client_ws.py", line 216, in receive
    raise RuntimeError("Concurrent call to receive() is not allowed")
RuntimeError: Concurrent call to receive() is not allowed

@FightMan01
Copy link
Author

Update on this:
aiohttp 3.8 released with a fix: https://github.com/aio-libs/aiohttp/releases/tag/v3.8.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants