[GH-ISSUE #3] error on start: TypeError: main.<locals>.join_callback() missing 1 required positional argument: 'data' #2

Closed
opened 2026-10-18 14:01:35 +00:00 by bsakaguchi · 4 comments
Owner

Originally created by @thistleknot on GitHub (Jan 12, 2025).
Original GitHub issue: https://github.com/open-webui/bot/issues/3

(open-webui) (base) [root@pve0 bot]# python -m examples.ai
Connecting to http://localhost:8080...
Connected!
Connection established!
Task exception was never retrieved
future: <Task finished name='Task-14' coro=<AsyncClient._handle_eio_message() done, defined at /root/miniconda3/envs/open-webui/lib/python3.11/site-packages/socketio/async_client.py:538> exception=TypeError("main..join_callback() missing 1 required positional argument: 'data'")>
Traceback (most recent call last):
File "/root/miniconda3/envs/open-webui/lib/python3.11/site-packages/socketio/async_client.py", line 557, in _handle_eio_message
await self._handle_ack(pkt.namespace, pkt.id, pkt.data)
File "/root/miniconda3/envs/open-webui/lib/python3.11/site-packages/socketio/async_client.py", line 435, in _handle_ack
await callback(*data)
^^^^^^^^^^^^^^^
TypeError: main..join_callback() missing 1 required positional argument: 'data'

Originally created by @thistleknot on GitHub (Jan 12, 2025). Original GitHub issue: https://github.com/open-webui/bot/issues/3 (open-webui) (base) [root@pve0 bot]# python -m examples.ai Connecting to http://localhost:8080... Connected! Connection established! Task exception was never retrieved future: <Task finished name='Task-14' coro=<AsyncClient._handle_eio_message() done, defined at /root/miniconda3/envs/open-webui/lib/python3.11/site-packages/socketio/async_client.py:538> exception=TypeError("main.<locals>.join_callback() missing 1 required positional argument: 'data'")> Traceback (most recent call last): File "/root/miniconda3/envs/open-webui/lib/python3.11/site-packages/socketio/async_client.py", line 557, in _handle_eio_message await self._handle_ack(pkt.namespace, pkt.id, pkt.data) File "/root/miniconda3/envs/open-webui/lib/python3.11/site-packages/socketio/async_client.py", line 435, in _handle_ack await callback(*data) ^^^^^^^^^^^^^^^ TypeError: main.<locals>.join_callback() missing 1 required positional argument: 'data'
Author
Owner

@thistleknot commented on GitHub (Jan 12, 2025):

I see I didn't add my auth token

settings - account - api key

modify env.py

add token

resolved

<!-- gh-comment-id:2585597245 --> @thistleknot commented on GitHub (Jan 12, 2025): I see I didn't add my auth token settings - account - api key modify env.py add token resolved
Author
Owner

@gabrieligbastos commented on GitHub (Jan 22, 2025):

I'm in the same, but i do have the token set. Why is that?

Received packet MESSAGE data 0{"sid":"_cI8dCqDTwj84Y6QAAAZ"}
Namespace / is connected
Connected!
Connection established!
Found token: sk-72***0a5
Emitting event "user-join" [/]
Sending packet MESSAGE data 21["user-join",{"auth":{"token":"sk-724***0a5"}}]
Received packet MESSAGE data 31[]
Received ack [/]
Task exception was never retrieved
future: <Task finished name='Task-13' coro=<AsyncClient._handle_eio_message() done, defined at /usr/local/lib/python3.11/site-packages/socketio/async_client.py:538> exception=TypeError("main.<locals>.join_callback() missing 1 required positional argument: 'data'")>
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/socketio/async_client.py", line 557, in _handle_eio_message
    await self._handle_ack(pkt.namespace, pkt.id, pkt.data)
  File "/usr/local/lib/python3.11/site-packages/socketio/async_client.py", line 435, in _handle_ack
    await callback(*data)
          ^^^^^^^^^^^^^^^
TypeError: main.<locals>.join_callback() missing 1 required positional argument: 'data'
Received packet PING data 
Sending packet PONG data 
Received packet PING data 
Sending packet PONG data 
Received packet PING data 
Sending packet PONG data 
Received packet PING data 
Sending packet PONG data 
Received packet PING data 
Sending packet PONG data 
Received packet PING data 
Sending packet PONG data 
Received packet PING data 
Sending packet PONG data 
^CSending packet CLOSE data None
Engine.IO connection dropped
Disconnected from the server!
Write loop: WebSocket connection was closed, aborting
Exiting write loop task
Server sent close packet data None, aborting
Waiting for write loop task to end
Exiting read loop task
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/app/backend/bot/examples/ai.py", line 133, in <module>
    asyncio.run(main())
  File "/usr/local/lib/python3.11/asyncio/runners.py", line 190, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/asyncio/base_events.py", line 654, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/app/backend/bot/examples/ai.py", line 128, in main
    await sio.wait()
  File "/usr/local/lib/python3.11/site-packages/socketio/async_client.py", line 190, in wait
    await self.sleep(1)  # give the reconnect task time to start up
    ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/socketio/async_client.py", line 366, in sleep
    return await self.eio.sleep(seconds)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/engineio/async_client.py", line 200, in sleep
    return await asyncio.sleep(seconds)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/asyncio/tasks.py", line 649, in sleep
    return await future
           ^^^^^^^^^^^^
asyncio.exceptions.CancelledError
<!-- gh-comment-id:2607720707 --> @gabrieligbastos commented on GitHub (Jan 22, 2025): I'm in the same, but i do have the token set. Why is that? ``` Received packet MESSAGE data 0{"sid":"_cI8dCqDTwj84Y6QAAAZ"} Namespace / is connected Connected! Connection established! Found token: sk-72***0a5 Emitting event "user-join" [/] Sending packet MESSAGE data 21["user-join",{"auth":{"token":"sk-724***0a5"}}] Received packet MESSAGE data 31[] Received ack [/] Task exception was never retrieved future: <Task finished name='Task-13' coro=<AsyncClient._handle_eio_message() done, defined at /usr/local/lib/python3.11/site-packages/socketio/async_client.py:538> exception=TypeError("main.<locals>.join_callback() missing 1 required positional argument: 'data'")> Traceback (most recent call last): File "/usr/local/lib/python3.11/site-packages/socketio/async_client.py", line 557, in _handle_eio_message await self._handle_ack(pkt.namespace, pkt.id, pkt.data) File "/usr/local/lib/python3.11/site-packages/socketio/async_client.py", line 435, in _handle_ack await callback(*data) ^^^^^^^^^^^^^^^ TypeError: main.<locals>.join_callback() missing 1 required positional argument: 'data' Received packet PING data Sending packet PONG data Received packet PING data Sending packet PONG data Received packet PING data Sending packet PONG data Received packet PING data Sending packet PONG data Received packet PING data Sending packet PONG data Received packet PING data Sending packet PONG data Received packet PING data Sending packet PONG data ^CSending packet CLOSE data None Engine.IO connection dropped Disconnected from the server! Write loop: WebSocket connection was closed, aborting Exiting write loop task Server sent close packet data None, aborting Waiting for write loop task to end Exiting read loop task Traceback (most recent call last): File "<frozen runpy>", line 198, in _run_module_as_main File "<frozen runpy>", line 88, in _run_code File "/app/backend/bot/examples/ai.py", line 133, in <module> asyncio.run(main()) File "/usr/local/lib/python3.11/asyncio/runners.py", line 190, in run return runner.run(main) ^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/asyncio/runners.py", line 118, in run return self._loop.run_until_complete(task) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/asyncio/base_events.py", line 654, in run_until_complete return future.result() ^^^^^^^^^^^^^^^ File "/app/backend/bot/examples/ai.py", line 128, in main await sio.wait() File "/usr/local/lib/python3.11/site-packages/socketio/async_client.py", line 190, in wait await self.sleep(1) # give the reconnect task time to start up ^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/socketio/async_client.py", line 366, in sleep return await self.eio.sleep(seconds) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/engineio/async_client.py", line 200, in sleep return await asyncio.sleep(seconds) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/asyncio/tasks.py", line 649, in sleep return await future ^^^^^^^^^^^^ asyncio.exceptions.CancelledError ```
Author
Owner

@okaeiz commented on GitHub (Jun 2, 2025):

I got the API key and set it but still getting the same error.

<!-- gh-comment-id:2928876249 --> @okaeiz commented on GitHub (Jun 2, 2025): I got the API key and set it but still getting the same error.
Author
Owner

@pauvos commented on GitHub (Jul 13, 2025):

It works for me with a JWT token I fetched from the login cookie.

<!-- gh-comment-id:3067011752 --> @pauvos commented on GitHub (Jul 13, 2025): It works for me with a JWT token I fetched from the login cookie.
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
open-webui/bot#2
No description provided.