Pre-checks
Deployment Method
Source (setup.sh)
Steps to Reproduce
启动程序后 未建立表 notifications 导致新增员工报错 表我自己创建的
read_text() 有默认字符集问题 如果系统未使用utf8字符集 会报错 我的解决办法是强制指定utf8
Expected vs Actual Behavior
启动程序后 未建立表 notifications 导致新增员工报错 表我自己创建的
read_text() 有默认字符集问题 如果系统未使用utf8字符集 会报错 我的解决办法是强制指定utf8
Logs / Screenshots
日志如下:
2026-04-27 22:40:36 | ERROR | 4b8a3781-f59 | app.core.middleware:dispatch:50 - <-- POST /api/agents/ ERROR 0.046s - 'gbk' codec can't decode byte 0x94 in position 9: illegal multibyte sequence
2026-04-27 22:40:36 | INFO | 4b8a3781-f59 | logging:callHandlers:1706 - 127.0.0.1:54757 - "POST /api/agents/ HTTP/1.1" 500
2026-04-27 22:40:36 | ERROR | 4b8a3781-f59 | logging:callHandlers:1706 - Exception in ASGI application
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\multiprocessing\spawn.py", line 122, in spawn_main
exitcode = _main(fd, parent_sentinel)
│ │ └ 316
│ └ 3
└ <function _main at 0x0000022BAD71DEE0>
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\multiprocessing\spawn.py", line 135, in _main
return self._bootstrap(parent_sentinel)
│ │ └ 316
│ └ <function BaseProcess._bootstrap at 0x0000022BAD46C720>
└
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\multiprocessing\process.py", line 314, in _bootstrap
self.run()
│ └ <function BaseProcess.run at 0x0000022BAD45BC40>
└
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\multiprocessing\process.py", line 108, in run
self._target(*self._args, **self._kwargs)
│ │ │ │ │ └ {'config': <uvicorn.config.Config object at 0x0000022BAD6F8410>, 'target': <bound method Server.run of <uvicorn.server.Server...
│ │ │ │ └
│ │ │ └ ()
│ │ └
│ └ <function subprocess_started at 0x0000022BAF85A020>
└
File "C:\Users\Administrator\Desktop\Clawith\backend.venv\Lib\site-packages\uvicorn_subprocess.py", line 80, in subprocess_started
target(sockets=sockets)
│ └ [<socket.socket fd=540, family=2, type=1, proto=6, laddr=('0.0.0.0', 8008)>]
└ <bound method Server.run of <uvicorn.server.Server object at 0x0000022BAF9CE1D0>>
File "C:\Users\Administrator\Desktop\Clawith\backend.venv\Lib\site-packages\uvicorn\server.py", line 75, in run
return asyncio_run(self.serve(sockets=sockets), loop_factory=self.config.get_loop_factory())
│ │ │ │ │ │ └ <function Config.get_loop_factory at 0x0000022BAF7EA480>
│ │ │ │ │ └ <uvicorn.config.Config object at 0x0000022BAD6F8410>
│ │ │ │ └ <uvicorn.server.Server object at 0x0000022BAF9CE1D0>
│ │ │ └ [<socket.socket fd=540, family=2, type=1, proto=6, laddr=('0.0.0.0', 8008)>]
│ │ └ <function Server.serve at 0x0000022BAF858D60>
│ └ <uvicorn.server.Server object at 0x0000022BAF9CE1D0>
└ <function asyncio_run at 0x0000022BAF211BC0>
File "C:\Users\Administrator\Desktop\Clawith\backend.venv\Lib\site-packages\uvicorn_compat.py", line 30, in asyncio_run
return runner.run(main)
│ │ └ <coroutine object Server.serve at 0x0000022BAF9C0A90>
│ └ <function Runner.run at 0x0000022BAF159E40>
�� <asyncio.runners.Runner object at 0x0000022BAF7F2610>
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\asyncio\runners.py", line 118, in run
return self._loop.run_until_complete(task)
│ │ │ └ <Task pending name='Task-1' coro=<Server.serve() running at C:\Users\Administrator\Desktop\Clawith\backend.venv\Lib\site-pac...
│ │ └ <function BaseEventLoop.run_until_complete at 0x0000022BAF1579C0>
│ └ <_WindowsSelectorEventLoop running=True closed=False debug=False>
└ <asyncio.runners.Runner object at 0x0000022BAF7F2610>
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\asyncio\base_events.py", line 640, in run_until_complete
self.run_forever()
│ └ <function BaseEventLoop.run_forever at 0x0000022BAF157920>
└ <_WindowsSelectorEventLoop running=True closed=False debug=False>
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\asyncio\base_events.py", line 607, in run_forever
self._run_once()
│ └ <function BaseEventLoop._run_once at 0x0000022BAF159760>
└ <_WindowsSelectorEventLoop running=True closed=False debug=False>
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\asyncio\base_events.py", line 1922, in _run_once
handle._run()
│ └ <function Handle._run at 0x0000022BAF07B880>
└ <Handle Task.task_wakeup()>
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\asyncio\events.py", line 80, in _run
self._context.run(self._callback, *self._args)
│ │ │ │ │ └ <member '_args' of 'Handle' objects>
│ │ │ │ └ <Handle Task.task_wakeup()>
│ │ │ └ <member '_callback' of 'Handle' objects>
│ │ └ <Handle Task.task_wakeup()>
│ └ <member '_context' of 'Handle' objects>
└ <Handle Task.task_wakeup()>
File "C:\Users\Administrator\Desktop\Clawith\backend.venv\Lib\site-packages\uvicorn\protocols\http\httptools_impl.py", line 420, in run_asgi
result = await app( # type: ignore[func-returns-value]
└ <uvicorn.middleware.proxy_headers.ProxyHeadersMiddleware object at 0x0000022BC0751ED0>
File "C:\Users\Administrator\Desktop\Clawith\backend.venv\Lib\site-packages\uvicorn\middleware\proxy_headers.py", line 60, in call
return await self.app(scope, receive, send)
│ │ │ │ └ <bound method RequestResponseCycle.send of <uvicorn.protocols.http.httptools_impl.RequestResponseCycle object at 0x0000022BC1...
│ │ │ └ <bound method RequestResponseCycle.receive of <uvicorn.protocols.http.httptools_impl.RequestResponseCycle object at 0x0000022...
│ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('127.0.0.1', 8008), 'cl...
│ └ <fastapi.applications.FastAPI object at 0x0000022BAFBC16D0>
└ <uvicorn.middleware.proxy_headers.ProxyHeadersMiddleware object at 0x0000022BC0751ED0>
File "C:\Users\Administrator\Desktop\Clawith\backend.venv\Lib\site-packages\fastapi\applications.py", line 1163, in call
await super().call(scope, receive, send)
│ │ └ <bound method RequestResponseCycle.send of <uvicorn.protocols.http.httptools_impl.RequestResponseCycle object at 0x0000022BC1...
│ └ <bound method RequestResponseCycle.receive of <uvicorn.protocols.http.httptools_impl.RequestResponseCycle object at 0x0000022...
└ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('127.0.0.1', 8008), 'cl...
File "C:\Users\Administrator\Desktop\Clawith\backend.venv\Lib\site-packages\starlette\applications.py", line 90, in call
await self.middleware_stack(scope, receive, send)
│ │ │ │ └ <bound method RequestResponseCycle.send of <uvicorn.protocols.http.httptools_impl.RequestResponseCycle object at 0x0000022BC1...
│ │ │ └ <bound method RequestResponseCycle.receive of <uvicorn.protocols.http.httptools_impl.RequestResponseCycle object at 0x0000022...
│ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('127.0.0.1', 8008), 'cl...
│ └ <starlette.middleware.errors.ServerErrorMiddleware object at 0x0000022BBFF3C150>
└ <fastapi.applications.FastAPI object at 0x0000022BAFBC16D0>
File "C:\Users\Administrator\Desktop\Clawith\backend.venv\Lib\site-packages\starlette\middleware\errors.py", line 186, in call
raise exc
File "C:\Users\Administrator\Desktop\Clawith\backend.venv\Lib\site-packages\starlette\middleware\errors.py", line 164, in call
await self.app(scope, receive, _send)
│ │ │ │ └ <function ServerErrorMiddleware.call.._send at 0x0000022BC1BF4A40>
│ │ │ └ <bound method RequestResponseCycle.receive of <uvicorn.protocols.http.httptools_impl.RequestResponseCycle object at 0x0000022...
│ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('127.0.0.1', 8008), 'cl...
│ └ <starlette.middleware.cors.CORSMiddleware object at 0x0000022BBFF3EF50>
└ <starlette.middleware.errors.ServerErrorMiddleware object at 0x0000022BBFF3C150>
File "C:\Users\Administrator\Desktop\Clawith\backend.venv\Lib\site-packages\starlette\middleware\cors.py", line 96, in call
await self.simple_response(scope, receive, send, request_headers=headers)
│ │ │ │ │ └ Headers({'host': 'localhost:8008', 'connection': 'close', 'content-length': '403', 'sec-ch-ua-platform': '"Windows"', 'author...
│ │ │ │ └ <function ServerErrorMiddleware.call.._send at 0x0000022BC1BF4A40>
│ │ │ └ <bound method RequestResponseCycle.receive of <uvicorn.protocols.http.httptools_impl.RequestResponseCycle object at 0x0000022...
│ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('127.0.0.1', 8008), 'cl...
│ └ <function CORSMiddleware.simple_response at 0x0000022BB0A0BC40>
└ <starlette.middleware.cors.CORSMiddleware object at 0x0000022BBFF3EF50>
File "C:\Users\Administrator\Desktop\Clawith\backend.venv\Lib\site-packages\starlette\middleware\cors.py", line 154, in simple_response
await self.app(scope, receive, send)
│ │ │ │ └ functools.partial(<bound method CORSMiddleware.send of <starlette.middleware.cors.CORSMiddleware object at 0x0000022BBFF3EF50...
│ │ │ └ <bound method RequestResponseCycle.receive of <uvicorn.protocols.http.httptools_impl.RequestResponseCycle object at 0x0000022...
│ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('127.0.0.1', 8008), 'cl...
│ └ <app.core.middleware.TraceIdMiddleware object at 0x0000022BC03EF890>
└ <starlette.middleware.cors.CORSMiddleware object at 0x0000022BBFF3EF50>
File "C:\Users\Administrator\Desktop\Clawith\backend.venv\Lib\site-packages\starlette\middleware\base.py", line 191, in call
with recv_stream, send_stream, collapse_excgroups():
│ │ └ <function collapse_excgroups at 0x0000022BB0863EC0>
│ └ MemoryObjectSendStream(_state=_MemoryObjectStreamState(max_buffer_size=0, buffer=deque([]), open_send_channels=0, open_receiv...
└ MemoryObjectReceiveStream(_state=_MemoryObjectStreamState(max_buffer_size=0, buffer=deque([]), open_send_channels=0, open_rec...
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\contextlib.py", line 155, in exit
self.gen.throw(typ, value, traceback)
│ │ │ │ │ └ <traceback object at 0x0000022BC1C7B640>
│ │ │ │ └ ExceptionGroup('unhandled errors in a TaskGroup', [UnicodeDecodeError('gbk', b'# Soul \xe2\x80\x94 {{agent_name}}\n\n## Ident...
│ │ │ └ <class 'ExceptionGroup'>
│ │ └ <method 'throw' of 'generator' objects>
│ └ <generator object collapse_excgroups at 0x0000022BC1529B60>
└ <contextlib._GeneratorContextManager object at 0x0000022BC1B3F890>
File "C:\Users\Administrator\Desktop\Clawith\backend.venv\Lib\site-packages\starlette_utils.py", line 87, in collapse_excgroups
raise exc
File "C:\Users\Administrator\Desktop\Clawith\backend.venv\Lib\site-packages\starlette\middleware\base.py", line 193, in call
response = await self.dispatch_func(request, call_next)
│ │ │ └ <function BaseHTTPMiddleware.call..call_next at 0x0000022BC1BF5120>
│ │ └ <starlette.middleware.base._CachedRequest object at 0x0000022BC1C20910>
│ └ <bound method TraceIdMiddleware.dispatch of <app.core.middleware.TraceIdMiddleware object at 0x0000022BC03EF890>>
└ <app.core.middleware.TraceIdMiddleware object at 0x0000022BC03EF890>
File "C:\Users\Administrator\Desktop\Clawith\backend\app\core\middleware.py", line 34, in dispatch
response = await call_next(request)
│ └ <starlette.middleware.base._CachedRequest object at 0x0000022BC1C20910>
└ <function BaseHTTPMiddleware.call..call_next at 0x0000022BC1BF5120>
File "C:\Users\Administrator\Desktop\Clawith\backend.venv\Lib\site-packages\starlette\middleware\base.py", line 168, in call_next
raise app_exc from app_exc.cause or app_exc.context
│ │ │ │ └ <attribute 'context' of 'BaseException' objects>
│ │ │ └ UnicodeDecodeError('gbk', b'# Soul \xe2\x80\x94 {{agent_name}}\n\n## Identity\n- \xe5\x90\x8d\xe7\xa7\xb0: {{agent_name}}...
│ │ └ <attribute 'cause' of 'BaseException' objects>
│ └ UnicodeDecodeError('gbk', b'# Soul \xe2\x80\x94 {{agent_name}}\n\n## Identity\n- \xe5\x90\x8d\xe7\xa7\xb0: {{agent_name}}...
└ UnicodeDecodeError('gbk', b'# Soul \xe2\x80\x94 {{agent_name}}\n\n## Identity\n- \xe5\x90\x8d\xe7\xa7\xb0: {{agent_name}}...
File "C:\Users\Administrator\Desktop\Clawith\backend.venv\Lib\site-packages\starlette\middleware\base.py", line 144, in coro
await self.app(scope, receive_or_disconnect, send_no_error)
│ │ │ │ └ <function BaseHTTPMiddleware.call..call_next..send_no_error at 0x0000022BC1BF6CA0>
│ │ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x0000022BC1BF68E0>
│ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('127.0.0.1', 8008), 'cl...
│ └ <starlette.middleware.exceptions.ExceptionMiddleware object at 0x0000022BBF6CEF50>
└ <app.core.middleware.TraceIdMiddleware object at 0x0000022BC03EF890>
File "C:\Users\Administrator\Desktop\Clawith\backend.venv\Lib\site-packages\starlette\middleware\exceptions.py", line 63, in call
await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
│ │ │ │ │ │ └ <function BaseHTTPMiddleware.call..call_next..send_no_error at 0x0000022BC1BF6CA0>
│ │ │ │ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x0000022BC1BF68E0>
│ │ │ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('127.0.0.1', 8008), 'cl...
│ │ │ └ <starlette.requests.Request object at 0x0000022BC1C09750>
│ │ └ <fastapi.middleware.asyncexitstack.AsyncExitStackMiddleware object at 0x0000022BBF6CCB90>
│ └ <starlette.middleware.exceptions.ExceptionMiddleware object at 0x0000022BBF6CEF50>
└ <function wrap_app_handling_exceptions at 0x0000022BB0993D80>
File "C:\Users\Administrator\Desktop\Clawith\backend.venv\Lib\site-packages\starlette_exception_handler.py", line 53, in wrapped_app
raise exc
File "C:\Users\Administrator\Desktop\Clawith\backend.venv\Lib\site-packages\starlette_exception_handler.py", line 42, in wrapped_app
await app(scope, receive, sender)
│ │ │ └ <function wrap_app_handling_exceptions..wrapped_app..sender at 0x0000022BC1BF6340>
│ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x0000022BC1BF68E0>
│ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('127.0.0.1', 8008), 'cl...
└ <fastapi.middleware.asyncexitstack.AsyncExitStackMiddleware object at 0x0000022BBF6CCB90>
File "C:\Users\Administrator\Desktop\Clawith\backend.venv\Lib\site-packages\fastapi\middleware\asyncexitstack.py", line 18, in call
await self.app(scope, receive, send)
│ │ │ │ └ <function wrap_app_handling_exceptions..wrapped_app..sender at 0x0000022BC1BF6340>
│ │ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x0000022BC1BF68E0>
│ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('127.0.0.1', 8008), 'cl...
│ └ <fastapi.routing.APIRouter object at 0x0000022BB128EBD0>
└ <fastapi.middleware.asyncexitstack.AsyncExitStackMiddleware object at 0x0000022BBF6CCB90>
File "C:\Users\Administrator\Desktop\Clawith\backend.venv\Lib\site-packages\starlette\routing.py", line 660, in call
await self.middleware_stack(scope, receive, send)
│ │ │ │ └ <function wrap_app_handling_exceptions..wrapped_app..sender at 0x0000022BC1BF6340>
│ │ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x0000022BC1BF68E0>
│ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('127.0.0.1', 8008), 'cl...
│ └ <bound method Router.app of <fastapi.routing.APIRouter object at 0x0000022BB128EBD0>>
└ <fastapi.routing.APIRouter object at 0x0000022BB128EBD0>
File "C:\Users\Administrator\Desktop\Clawith\backend.venv\Lib\site-packages\starlette\routing.py", line 680, in app
await route.handle(scope, receive, send)
│ │ │ │ └ <function wrap_app_handling_exceptions..wrapped_app..sender at 0x0000022BC1BF6340>
│ │ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x0000022BC1BF68E0>
│ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('127.0.0.1', 8008), 'cl...
│ └ <function Route.handle at 0x0000022BB09CD300>
└ APIRoute(path='/api/agents/', name='create_agent', methods=['POST'])
File "C:\Users\Administrator\Desktop\Clawith\backend.venv\Lib\site-packages\starlette\routing.py", line 276, in handle
await self.app(scope, receive, send)
│ │ │ │ └ <function wrap_app_handling_exceptions..wrapped_app..sender at 0x0000022BC1BF6340>
│ │ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x0000022BC1BF68E0>
│ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('127.0.0.1', 8008), 'cl...
│ └ <function request_response..app at 0x0000022BC02EA8E0>
└ APIRoute(path='/api/agents/', name='create_agent', methods=['POST'])
File "C:\Users\Administrator\Desktop\Clawith\backend.venv\Lib\site-packages\fastapi\routing.py", line 134, in app
await wrap_app_handling_exceptions(app, request)(scope, receive, send)
│ │ │ │ │ └ <function wrap_app_handling_exceptions..wrapped_app..sender at 0x0000022BC1BF6340>
│ │ │ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x0000022BC1BF68E0>
│ │ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('127.0.0.1', 8008), 'cl...
│ │ └ <starlette.requests.Request object at 0x0000022BC1C6FE50>
│ └ <function request_response..app..app at 0x0000022BC1BF6E80>
└ <function wrap_app_handling_exceptions at 0x0000022BB0993D80>
File "C:\Users\Administrator\Desktop\Clawith\backend.venv\Lib\site-packages\starlette_exception_handler.py", line 53, in wrapped_app
raise exc
File "C:\Users\Administrator\Desktop\Clawith\backend.venv\Lib\site-packages\starlette_exception_handler.py", line 42, in wrapped_app
await app(scope, receive, sender)
│ │ │ └ <function wrap_app_handling_exceptions..wrapped_app..sender at 0x0000022BC1BF6AC0>
│ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x0000022BC1BF68E0>
│ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('127.0.0.1', 8008), 'cl...
└ <function request_response..app..app at 0x0000022BC1BF6E80>
File "C:\Users\Administrator\Desktop\Clawith\backend.venv\Lib\site-packages\fastapi\routing.py", line 120, in app
response = await f(request)
│ └ <starlette.requests.Request object at 0x0000022BC1C6FE50>
└ <function get_request_handler..app at 0x0000022BC02EA7A0>
File "C:\Users\Administrator\Desktop\Clawith\backend.venv\Lib\site-packages\fastapi\routing.py", line 674, in app
raw_response = await run_endpoint_function(
└ <function run_endpoint_function at 0x0000022BB09CF380>
File "C:\Users\Administrator\Desktop\Clawith\backend.venv\Lib\site-packages\fastapi\routing.py", line 328, in run_endpoint_function
return await dependant.call(**values)
│ │ └ {'current_user': <app.models.user.User object at 0x0000022BC1C79B10>, 'db': <sqlalchemy.ext.asyncio.session.AsyncSession obje...
│ └ <function create_agent at 0x0000022BB3862DE0>
└ Dependant(path_params=[], query_params=[], header_params=[], cookie_params=[], body_params=[ModelField(field_info=Body(Pydant...
File "C:\Users\Administrator\Desktop\Clawith\backend\app\api\agents.py", line 321, in create_agent
await agent_manager.initialize_agent_files(
│ └ <function AgentManager.initialize_agent_files at 0x0000022BC1639260>
└ <app.services.agent_manager.AgentManager object at 0x0000022BC1672390>
File "C:\Users\Administrator\Desktop\Clawith\backend\app\services\agent_manager.py", line 72, in initialize_agent_files
template_content = soul_path.read_text()
│ └ <function Path.read_text at 0x0000022BAD402A20>
└ WindowsPath('C:/Users/Administrator/.clawith/data/agents/e67860e2-e055-471a-922a-44752bf44f48/soul.md')
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\pathlib.py", line 1059, in read_text
return f.read()
│ └ <method 'read' of '_io.TextIOWrapper' objects>
└ <_io.TextIOWrapper name='C:\Users\Administrator\.clawith\data\agents\e67860e2-e055-471a-922a-44752bf44f48\soul.md' mod...
UnicodeDecodeError: 'gbk' codec can't decode byte 0x94 in position 9: illegal multibyte sequence
Pre-checks
Deployment Method
Source (setup.sh)
Steps to Reproduce
启动程序后 未建立表 notifications 导致新增员工报错 表我自己创建的
read_text() 有默认字符集问题 如果系统未使用utf8字符集 会报错 我的解决办法是强制指定utf8
Expected vs Actual Behavior
启动程序后 未建立表 notifications 导致新增员工报错 表我自己创建的
read_text() 有默认字符集问题 如果系统未使用utf8字符集 会报错 我的解决办法是强制指定utf8
Logs / Screenshots
日志如下:
2026-04-27 22:40:36 | ERROR | 4b8a3781-f59 | app.core.middleware:dispatch:50 - <-- POST /api/agents/ ERROR 0.046s - 'gbk' codec can't decode byte 0x94 in position 9: illegal multibyte sequence
2026-04-27 22:40:36 | INFO | 4b8a3781-f59 | logging:callHandlers:1706 - 127.0.0.1:54757 - "POST /api/agents/ HTTP/1.1" 500
2026-04-27 22:40:36 | ERROR | 4b8a3781-f59 | logging:callHandlers:1706 - Exception in ASGI application
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\multiprocessing\spawn.py", line 122, in spawn_main
exitcode = _main(fd, parent_sentinel)
│ │ └ 316
│ └ 3
└ <function _main at 0x0000022BAD71DEE0>
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\multiprocessing\spawn.py", line 135, in _main
return self._bootstrap(parent_sentinel)
│ │ └ 316
│ └ <function BaseProcess._bootstrap at 0x0000022BAD46C720>
└
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\multiprocessing\process.py", line 314, in _bootstrap
self.run()
│ └ <function BaseProcess.run at 0x0000022BAD45BC40>
└
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\multiprocessing\process.py", line 108, in run
self._target(*self._args, **self._kwargs)
│ │ │ │ │ └ {'config': <uvicorn.config.Config object at 0x0000022BAD6F8410>, 'target': <bound method Server.run of <uvicorn.server.Server...
│ │ │ │ └
│ │ │ └ ()
│ │ └
│ └ <function subprocess_started at 0x0000022BAF85A020>
└
File "C:\Users\Administrator\Desktop\Clawith\backend.venv\Lib\site-packages\uvicorn_subprocess.py", line 80, in subprocess_started
target(sockets=sockets)
│ └ [<socket.socket fd=540, family=2, type=1, proto=6, laddr=('0.0.0.0', 8008)>]
└ <bound method Server.run of <uvicorn.server.Server object at 0x0000022BAF9CE1D0>>
File "C:\Users\Administrator\Desktop\Clawith\backend.venv\Lib\site-packages\uvicorn\server.py", line 75, in run
return asyncio_run(self.serve(sockets=sockets), loop_factory=self.config.get_loop_factory())
│ │ │ │ │ │ └ <function Config.get_loop_factory at 0x0000022BAF7EA480>
│ │ │ │ │ └ <uvicorn.config.Config object at 0x0000022BAD6F8410>
│ │ │ │ └ <uvicorn.server.Server object at 0x0000022BAF9CE1D0>
│ │ │ └ [<socket.socket fd=540, family=2, type=1, proto=6, laddr=('0.0.0.0', 8008)>]
│ │ └ <function Server.serve at 0x0000022BAF858D60>
│ └ <uvicorn.server.Server object at 0x0000022BAF9CE1D0>
└ <function asyncio_run at 0x0000022BAF211BC0>
File "C:\Users\Administrator\Desktop\Clawith\backend.venv\Lib\site-packages\uvicorn_compat.py", line 30, in asyncio_run
return runner.run(main)
│ │ └ <coroutine object Server.serve at 0x0000022BAF9C0A90>
│ └ <function Runner.run at 0x0000022BAF159E40>
�� <asyncio.runners.Runner object at 0x0000022BAF7F2610>
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\asyncio\runners.py", line 118, in run
return self._loop.run_until_complete(task)
│ │ │ └ <Task pending name='Task-1' coro=<Server.serve() running at C:\Users\Administrator\Desktop\Clawith\backend.venv\Lib\site-pac...
│ │ └ <function BaseEventLoop.run_until_complete at 0x0000022BAF1579C0>
│ └ <_WindowsSelectorEventLoop running=True closed=False debug=False>
└ <asyncio.runners.Runner object at 0x0000022BAF7F2610>
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\asyncio\base_events.py", line 640, in run_until_complete
self.run_forever()
│ └ <function BaseEventLoop.run_forever at 0x0000022BAF157920>
└ <_WindowsSelectorEventLoop running=True closed=False debug=False>
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\asyncio\base_events.py", line 607, in run_forever
self._run_once()
│ └ <function BaseEventLoop._run_once at 0x0000022BAF159760>
└ <_WindowsSelectorEventLoop running=True closed=False debug=False>
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\asyncio\base_events.py", line 1922, in _run_once
handle._run()
│ └ <function Handle._run at 0x0000022BAF07B880>
└ <Handle Task.task_wakeup()>
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\asyncio\events.py", line 80, in _run
self._context.run(self._callback, *self._args)
│ │ │ │ │ └ <member '_args' of 'Handle' objects>
│ │ │ │ └ <Handle Task.task_wakeup()>
│ │ │ └ <member '_callback' of 'Handle' objects>
│ │ └ <Handle Task.task_wakeup()>
│ └ <member '_context' of 'Handle' objects>
└ <Handle Task.task_wakeup()>
File "C:\Users\Administrator\Desktop\Clawith\backend\app\core\middleware.py", line 34, in dispatch
response = await call_next(request)
│ └ <starlette.middleware.base._CachedRequest object at 0x0000022BC1C20910>
└ <function BaseHTTPMiddleware.call..call_next at 0x0000022BC1BF5120>
File "C:\Users\Administrator\Desktop\Clawith\backend.venv\Lib\site-packages\starlette\middleware\base.py", line 168, in call_next
raise app_exc from app_exc.cause or app_exc.context
│ │ │ │ └ <attribute 'context' of 'BaseException' objects>
│ │ │ └ UnicodeDecodeError('gbk', b'# Soul \xe2\x80\x94 {{agent_name}}\n\n## Identity\n- \xe5\x90\x8d\xe7\xa7\xb0: {{agent_name}}...
│ │ └ <attribute 'cause' of 'BaseException' objects>
│ └ UnicodeDecodeError('gbk', b'# Soul \xe2\x80\x94 {{agent_name}}\n\n## Identity\n- \xe5\x90\x8d\xe7\xa7\xb0: {{agent_name}}...
└ UnicodeDecodeError('gbk', b'# Soul \xe2\x80\x94 {{agent_name}}\n\n## Identity\n- \xe5\x90\x8d\xe7\xa7\xb0: {{agent_name}}...
File "C:\Users\Administrator\Desktop\Clawith\backend.venv\Lib\site-packages\starlette\middleware\base.py", line 144, in coro
await self.app(scope, receive_or_disconnect, send_no_error)
│ │ │ │ └ <function BaseHTTPMiddleware.call..call_next..send_no_error at 0x0000022BC1BF6CA0>
│ │ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x0000022BC1BF68E0>
│ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('127.0.0.1', 8008), 'cl...
│ └ <starlette.middleware.exceptions.ExceptionMiddleware object at 0x0000022BBF6CEF50>
└ <app.core.middleware.TraceIdMiddleware object at 0x0000022BC03EF890>
File "C:\Users\Administrator\Desktop\Clawith\backend.venv\Lib\site-packages\starlette\middleware\exceptions.py", line 63, in call
await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
│ │ │ │ │ │ └ <function BaseHTTPMiddleware.call..call_next..send_no_error at 0x0000022BC1BF6CA0>
│ │ │ │ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x0000022BC1BF68E0>
│ │ │ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('127.0.0.1', 8008), 'cl...
│ │ │ └ <starlette.requests.Request object at 0x0000022BC1C09750>
│ │ └ <fastapi.middleware.asyncexitstack.AsyncExitStackMiddleware object at 0x0000022BBF6CCB90>
│ └ <starlette.middleware.exceptions.ExceptionMiddleware object at 0x0000022BBF6CEF50>
└ <function wrap_app_handling_exceptions at 0x0000022BB0993D80>
File "C:\Users\Administrator\Desktop\Clawith\backend.venv\Lib\site-packages\starlette_exception_handler.py", line 53, in wrapped_app
raise exc
File "C:\Users\Administrator\Desktop\Clawith\backend.venv\Lib\site-packages\starlette_exception_handler.py", line 42, in wrapped_app
await app(scope, receive, sender)
│ │ │ └ <function wrap_app_handling_exceptions..wrapped_app..sender at 0x0000022BC1BF6340>
│ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x0000022BC1BF68E0>
│ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('127.0.0.1', 8008), 'cl...
└ <fastapi.middleware.asyncexitstack.AsyncExitStackMiddleware object at 0x0000022BBF6CCB90>
File "C:\Users\Administrator\Desktop\Clawith\backend.venv\Lib\site-packages\fastapi\middleware\asyncexitstack.py", line 18, in call
await self.app(scope, receive, send)
│ │ │ │ └ <function wrap_app_handling_exceptions..wrapped_app..sender at 0x0000022BC1BF6340>
│ │ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x0000022BC1BF68E0>
│ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('127.0.0.1', 8008), 'cl...
│ └ <fastapi.routing.APIRouter object at 0x0000022BB128EBD0>
└ <fastapi.middleware.asyncexitstack.AsyncExitStackMiddleware object at 0x0000022BBF6CCB90>
File "C:\Users\Administrator\Desktop\Clawith\backend.venv\Lib\site-packages\starlette\routing.py", line 660, in call
await self.middleware_stack(scope, receive, send)
│ │ │ │ └ <function wrap_app_handling_exceptions..wrapped_app..sender at 0x0000022BC1BF6340>
│ │ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x0000022BC1BF68E0>
│ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('127.0.0.1', 8008), 'cl...
│ └ <bound method Router.app of <fastapi.routing.APIRouter object at 0x0000022BB128EBD0>>
└ <fastapi.routing.APIRouter object at 0x0000022BB128EBD0>
File "C:\Users\Administrator\Desktop\Clawith\backend.venv\Lib\site-packages\starlette\routing.py", line 680, in app
await route.handle(scope, receive, send)
│ │ │ │ └ <function wrap_app_handling_exceptions..wrapped_app..sender at 0x0000022BC1BF6340>
│ │ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x0000022BC1BF68E0>
│ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('127.0.0.1', 8008), 'cl...
│ └ <function Route.handle at 0x0000022BB09CD300>
└ APIRoute(path='/api/agents/', name='create_agent', methods=['POST'])
File "C:\Users\Administrator\Desktop\Clawith\backend.venv\Lib\site-packages\starlette\routing.py", line 276, in handle
await self.app(scope, receive, send)
│ │ │ │ └ <function wrap_app_handling_exceptions..wrapped_app..sender at 0x0000022BC1BF6340>
│ │ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x0000022BC1BF68E0>
│ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('127.0.0.1', 8008), 'cl...
│ └ <function request_response..app at 0x0000022BC02EA8E0>
└ APIRoute(path='/api/agents/', name='create_agent', methods=['POST'])
File "C:\Users\Administrator\Desktop\Clawith\backend.venv\Lib\site-packages\fastapi\routing.py", line 134, in app
await wrap_app_handling_exceptions(app, request)(scope, receive, send)
│ │ │ │ │ └ <function wrap_app_handling_exceptions..wrapped_app..sender at 0x0000022BC1BF6340>
│ │ │ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x0000022BC1BF68E0>
│ │ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('127.0.0.1', 8008), 'cl...
│ │ └ <starlette.requests.Request object at 0x0000022BC1C6FE50>
│ └ <function request_response..app..app at 0x0000022BC1BF6E80>
└ <function wrap_app_handling_exceptions at 0x0000022BB0993D80>
File "C:\Users\Administrator\Desktop\Clawith\backend.venv\Lib\site-packages\starlette_exception_handler.py", line 53, in wrapped_app
raise exc
File "C:\Users\Administrator\Desktop\Clawith\backend.venv\Lib\site-packages\starlette_exception_handler.py", line 42, in wrapped_app
await app(scope, receive, sender)
│ │ │ └ <function wrap_app_handling_exceptions..wrapped_app..sender at 0x0000022BC1BF6AC0>
│ │ └ <function BaseHTTPMiddleware.call..call_next..receive_or_disconnect at 0x0000022BC1BF68E0>
│ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('127.0.0.1', 8008), 'cl...
└ <function request_response..app..app at 0x0000022BC1BF6E80>
File "C:\Users\Administrator\Desktop\Clawith\backend.venv\Lib\site-packages\fastapi\routing.py", line 120, in app
response = await f(request)
│ └ <starlette.requests.Request object at 0x0000022BC1C6FE50>
└ <function get_request_handler..app at 0x0000022BC02EA7A0>
File "C:\Users\Administrator\Desktop\Clawith\backend.venv\Lib\site-packages\fastapi\routing.py", line 674, in app
raw_response = await run_endpoint_function(
└ <function run_endpoint_function at 0x0000022BB09CF380>
File "C:\Users\Administrator\Desktop\Clawith\backend.venv\Lib\site-packages\fastapi\routing.py", line 328, in run_endpoint_function
return await dependant.call(**values)
│ │ └ {'current_user': <app.models.user.User object at 0x0000022BC1C79B10>, 'db': <sqlalchemy.ext.asyncio.session.AsyncSession obje...
│ └ <function create_agent at 0x0000022BB3862DE0>
└ Dependant(path_params=[], query_params=[], header_params=[], cookie_params=[], body_params=[ModelField(field_info=Body(Pydant...
File "C:\Users\Administrator\Desktop\Clawith\backend\app\api\agents.py", line 321, in create_agent
await agent_manager.initialize_agent_files(
│ └ <function AgentManager.initialize_agent_files at 0x0000022BC1639260>
└ <app.services.agent_manager.AgentManager object at 0x0000022BC1672390>
File "C:\Users\Administrator\Desktop\Clawith\backend\app\services\agent_manager.py", line 72, in initialize_agent_files
template_content = soul_path.read_text()
│ └ <function Path.read_text at 0x0000022BAD402A20>
└ WindowsPath('C:/Users/Administrator/.clawith/data/agents/e67860e2-e055-471a-922a-44752bf44f48/soul.md')
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\pathlib.py", line 1059, in read_text
return f.read()
│ └ <method 'read' of '_io.TextIOWrapper' objects>
└ <_io.TextIOWrapper name='C:\Users\Administrator\.clawith\data\agents\e67860e2-e055-471a-922a-44752bf44f48\soul.md' mod...
UnicodeDecodeError: 'gbk' codec can't decode byte 0x94 in position 9: illegal multibyte sequence