Qwen-Agent icon indicating copy to clipboard operation
Qwen-Agent copied to clipboard

运行example报错

Open keisni opened this issue 8 months ago • 7 comments

windows环境cmd命令行执行: python assistant_add_custom_tool.py Running on local URL: http://127.0.0.1:7860

To create a public link, set share=True in launch(). ERROR: Exception in ASGI application Traceback (most recent call last): File "C:\Python311\Lib\site-packages\uvicorn\protocols\http\h11_impl.py", line 408, in run_asgi result = await app( # type: ignore[func-returns-value] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Python311\Lib\site-packages\uvicorn\middleware\proxy_headers.py", line 69, in call return await self.app(scope, receive, send) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Python311\Lib\site-packages\fastapi\applications.py", line 1054, in call await super().call(scope, receive, send) File "C:\Python311\Lib\site-packages\starlette\applications.py", line 123, in call await self.middleware_stack(scope, receive, send) File "C:\Python311\Lib\site-packages\starlette\middleware\errors.py", line 186, in call raise exc File "C:\Python311\Lib\site-packages\starlette\middleware\errors.py", line 164, in call await self.app(scope, receive, _send) File "C:\Python311\Lib\site-packages\gradio\route_utils.py", line 720, in call await self.simple_response(scope, receive, send, request_headers=headers) File "C:\Python311\Lib\site-packages\gradio\route_utils.py", line 736, in simple_response await self.app(scope, receive, send) File "C:\Python311\Lib\site-packages\starlette\middleware\exceptions.py", line 62, in call await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send) File "C:\Python311\Lib\site-packages\starlette_exception_handler.py", line 64, in wrapped_app raise exc File "C:\Python311\Lib\site-packages\starlette_exception_handler.py", line 53, in wrapped_app await app(scope, receive, sender) File "C:\Python311\Lib\site-packages\starlette\routing.py", line 758, in call await self.middleware_stack(scope, receive, send) File "C:\Python311\Lib\site-packages\starlette\routing.py", line 778, in app await route.handle(scope, receive, send) File "C:\Python311\Lib\site-packages\starlette\routing.py", line 299, in handle await self.app(scope, receive, send) File "C:\Python311\Lib\site-packages\starlette\routing.py", line 79, in app await wrap_app_handling_exceptions(app, request)(scope, receive, send) File "C:\Python311\Lib\site-packages\starlette_exception_handler.py", line 64, in wrapped_app raise exc File "C:\Python311\Lib\site-packages\starlette_exception_handler.py", line 53, in wrapped_app await app(scope, receive, sender) File "C:\Python311\Lib\site-packages\starlette\routing.py", line 74, in app response = await func(request) ^^^^^^^^^^^^^^^^^^^ File "C:\Python311\Lib\site-packages\fastapi\routing.py", line 278, in app raw_response = await run_endpoint_function( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Python311\Lib\site-packages\fastapi\routing.py", line 193, in run_endpoint_function return await run_in_threadpool(dependant.call, **values) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Python311\Lib\site-packages\starlette\concurrency.py", line 42, in run_in_threadpool return await anyio.to_thread.run_sync(func, *args) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Python311\Lib\site-packages\anyio\to_thread.py", line 56, in run_sync return await get_async_backend().run_sync_in_worker_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Python311\Lib\site-packages\anyio_backends_asyncio.py", line 2144, in run_sync_in_worker_thread return await future ^^^^^^^^^^^^ File "C:\Python311\Lib\site-packages\anyio_backends_asyncio.py", line 851, in run result = context.run(func, *args) ^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Python311\Lib\site-packages\gradio\routes.py", line 473, in custom_component_path Path(path).read_text().encode() ^^^^^^^^^^^^^^^^^^^^^^ File "C:\Python311\Lib\pathlib.py", line 1059, in read_text return f.read() ^^^^^^^^ UnicodeDecodeError: 'gbk' codec can't decode byte 0x93 in position 886707: illegal multibyte sequence

keisni avatar May 31 '24 06:05 keisni