llamafactory-cli webui启动报错TypeError: argument of type ‘bool‘ is not iterable

一、问题

在阿里云NoteBook上启动llamafactory-cli webui报错TypeError: argument of type ‘bool’ is not iterable

This share link expires in 72 hours. For free permanent hosting and GPU upgrades, run `gradio deploy` from the terminal in the working directory to deploy to Hugging Face Spaces (https://huggingface.co/spaces)
ERROR:    Exception in ASGI application
Traceback (most recent call last):File "/usr/local/lib/python3.11/site-packages/uvicorn/protocols/http/h11_impl.py", line 403, in run_asgiresult = await app(  # type: ignore[func-returns-value]^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^File "/usr/local/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 60, in __call__return await self.app(scope, receive, send)^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^File "/usr/local/lib/python3.11/site-packages/fastapi/applications.py", line 1054, in __call__await super().__call__(scope, receive, send)File "/usr/local/lib/python3.11/site-packages/starlette/applications.py", line 112, in __call__await self.middleware_stack(scope, receive, send)File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 187, in __call__raise excFile "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 165, in __call__await self.app(scope, receive, _send)File "/usr/local/lib/python3.11/site-packages/gradio/route_utils.py", line 789, in __call__await self.app(scope, receive, send)File "/usr/local/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 62, in __call__await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_appraise excFile "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_appawait app(scope, receive, sender)File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 714, in __call__await self.middleware_stack(scope, receive, send)File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 734, in appawait route.handle(scope, receive, send)File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 288, in handleawait self.app(scope, receive, send)File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 76, in appawait wrap_app_handling_exceptions(app, request)(scope, receive, send)File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_appraise excFile "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_appawait app(scope, receive, sender)File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 73, in appresponse = await f(request)^^^^^^^^^^^^^^^^File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 301, in appraw_response = await run_endpoint_function(^^^^^^^^^^^^^^^^^^^^^^^^^^^^File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 214, in run_endpoint_functionreturn await run_in_threadpool(dependant.call, **values)^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^File "/usr/local/lib/python3.11/site-packages/starlette/concurrency.py", line 37, in run_in_threadpoolreturn await anyio.to_thread.run_sync(func)^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^File "/usr/local/lib/python3.11/site-packages/anyio/to_thread.py", line 56, in run_syncreturn await get_async_backend().run_sync_in_worker_thread(^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 2470, in run_sync_in_worker_threadreturn await future^^^^^^^^^^^^File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 967, in runresult = context.run(func, *args)^^^^^^^^^^^^^^^^^^^^^^^^File "/usr/local/lib/python3.11/site-packages/gradio/routes.py", line 584, in maingradio_api_info = api_info(request)^^^^^^^^^^^^^^^^^File "/usr/local/lib/python3.11/site-packages/gradio/routes.py", line 615, in api_infoapi_info = utils.safe_deepcopy(app.get_blocks().get_api_info())^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^File "/usr/local/lib/python3.11/site-packages/gradio/blocks.py", line 3019, in get_api_infopython_type = client_utils.json_schema_to_python_type(info)^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 931, in json_schema_to_python_typetype_ = _json_schema_to_python_type(schema, schema.get("$defs"))^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 976, in _json_schema_to_python_typeelements = _json_schema_to_python_type(items, defs)^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 946, in _json_schema_to_python_typereturn _json_schema_to_python_type(defs[schema["$ref"].split("/")[-1]], defs)^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 985, in _json_schema_to_python_typedes = [^File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 986, in <listcomp>f"{n}: {_json_schema_to_python_type(v, defs)}{get_desc(v)}"^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 998, in _json_schema_to_python_typedesc = " | ".join([_json_schema_to_python_type(i, defs) for i in schema[type_]])^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 998, in <listcomp>desc = " | ".join([_json_schema_to_python_type(i, defs) for i in schema[type_]])^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 946, in _json_schema_to_python_typereturn _json_schema_to_python_type(defs[schema["$ref"].split("/")[-1]], defs)^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 985, in _json_schema_to_python_typedes = [^File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 986, in <listcomp>f"{n}: {_json_schema_to_python_type(v, defs)}{get_desc(v)}"^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 993, in _json_schema_to_python_typef"str, {_json_schema_to_python_type(schema['additionalProperties'], defs)}"^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 939, in _json_schema_to_python_typetype_ = get_type(schema)^^^^^^^^^^^^^^^^File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 898, in get_typeif "const" in schema:^^^^^^^^^^^^^^^^^
TypeError: argument of type 'bool' is not iterable
...
二、问题解决

pydantic版本回退到: 2.10.6

pip uninstall pydantic
pip install pydantic==2.10.6

重新启动llamafactory-cli webui,能够正常通过浏览器打开webui
在这里插入图片描述
在这里插入图片描述



参考:
https://juejin.cn/post/7490524670082449471

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。
如若转载,请注明出处:http://www.pswp.cn/diannao/81347.shtml
繁体地址,请注明出处:http://hk.pswp.cn/diannao/81347.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

Gas 优化不足、升级机制缺陷问题

以下是针对智能合约中 Gas 优化不足 与 升级机制缺陷 的技术风险分析与解决方案: 一、Gas 优化不足 1. 核心问题 Gas 优化不足会导致合约执行成本过高,直接影响用户体验和协议可行性,尤其在交易高峰期可能引发链上拥堵或交易失败。 2. 常见风险点 冗余计算与存储操作 例如…

使用xlwings计算合并单元格的求和

有如下一个excel表 表内有合并单元格&#xff0c;现在需要求和&#xff0c;不能直接下拉填充公式怎么办&#xff1f; 通常的办法是先取消合并单元格&#xff0c;计算后&#xff0c;再次合并单元格&#xff0c;比较繁琐。 在此&#xff0c;尝试使用python和xlwings运行直接给出…

[创业之路-354]:农业文明到智能纪元:四次工业革命下的人类迁徙与价值重构

农业文明到智能纪元&#xff1a;四次工业革命下的人类迁徙与价值重构 从游牧到定居&#xff0c;从蒸汽轰鸣到算法洪流&#xff0c;人类文明的每一次跨越都伴随着生产关系的剧烈震荡。四次工业革命的浪潮不仅重塑了物质世界的生产方式&#xff0c;更将人类推向了身份认同与存在…

LeetCode 2302.统计得分小于 K 的子数组数目:滑动窗口(不需要前缀和)

【LetMeFly】2302.统计得分小于 K 的子数组数目&#xff1a;滑动窗口&#xff08;不需要前缀和&#xff09; 力扣题目链接&#xff1a;https://leetcode.cn/problems/count-subarrays-with-score-less-than-k/ 一个数组的 分数 定义为数组之和 乘以 数组的长度。 比方说&…

kafka学习笔记(四、生产者(客户端)深入研究(二)——消费者协调器与_consumer_offsets剖析)

1.消费者协调器和组协调器 如果消费者客户端中配置了多个分配策略&#xff0c;则多消费者的分区分配交由消费者协调器和组协调器来完成&#xff0c;他们之间使用一套组协调协议进行交互。 1.1.在均衡原理 将全部消费者分成多个子集&#xff0c;每个消费者组的子集在服务中对…

快速将FastAPI接口转为模型上下文协议(MCP)!

fastapi_mcp 是一个用于将 FastAPI 端点暴露为模型上下文协议&#xff08;Model Context Protocol, MCP&#xff09;工具的库&#xff0c;并且支持认证功能。 环境macbook&#xff0c;python3.13 pip install fastapi uvicorn fastapi-mcp 代码 from fastapi import FastAPI, …

实验数据的转换

最近做实验需要把x轴y轴z轴的数据处理一下&#xff0c;总结一下解决的方法&#xff1a; 源文件为两个txt文档&#xff0c;分别为x轴和y轴&#xff0c;如下&#xff1a; 最终需要达到的效果是如下&#xff1a; 就是需要把各个矩阵的数据整理好放在同一个txt文档里。 步骤① …

第Y3周:yolov5s.yaml文件解读

&#x1f368; 本文为&#x1f517;365天深度学习训练营 中的学习记录博客&#x1f356; 原作者&#xff1a;K同学啊 本次任务&#xff1a;将yolov5s网络模型中的第4层的C3x2修改为C3x1&#xff0c;第6层的C3x3修改为C3x2。 首先输出原来的网络结构&#xff1a; from n pa…

Ansible安装配置

一、前提 服务器操作系统均为centos7.9 主机ipmaster(Ansible管理端)172.25.192.2node1172.25.192.10node2172.25.192.3 更新/etc/hosts文件 二、安装 master节点&#xff1a; 1. 安装epel源 yum install -y epel-release 2. 安装Ansible yum install -y ansible A…

MySQL中ROW_NUMBER() OVER的用法以及使用场景

使用语法 ROW_NUMBER() OVER ([PARTITION BY partition_column1, partition_column2, ...]ORDER BY sort_column1 [ASC|DESC], sort_column2 [ASC|DESC], ... )PARTITION BY&#xff1a;将数据按指定列分组&#xff0c;每组内单独生成行号。ORDER BY&#xff1a;决定组内行号的…

【人工智能】释放本地AI潜能:LM Studio用户脚本自动化DeepSeek的实战指南

《Python OpenCV从菜鸟到高手》带你进入图像处理与计算机视觉的大门! 解锁Python编程的无限可能:《奇妙的Python》带你漫游代码世界 随着大型语言模型(LLM)的快速发展,DeepSeek以其高效的性能和开源特性成为开发者关注的焦点。LM Studio作为一款强大的本地AI模型管理工具…

笔试强训:Day3

一、牛牛冲钻五&#xff08;模拟&#xff09; 登录—专业IT笔试面试备考平台_牛客网 #include<iostream> using namespace std; int main(){int t,n,k;string s;cin>>t;while(t--){cin>>n>>k>>s;int ret0;//统计加了多少星for(int i0;i<n;i)…

语音识别质量的跟踪

背景 这个项目是用来生成结构化的电子病历的。数据的来源是医生的录音。中间有一大堆的处理&#xff0c;语音识别&#xff0c;关键字匹配&#xff0c;结构化处理&#xff0c;病历编辑......。最多的时候给上百家医院服务。 语音识别质量的跟踪 一、0225医院的训练后的情况分…

人工智能搜索时代的SEO:关键趋势与优化策略

随着人工智能&#xff08;AI&#xff09;技术的飞速发展&#xff0c;搜索引擎的运作方式正在经历前所未有的变革。2025年&#xff0c;AI驱动的搜索&#xff08;如谷歌的AI概览、ChatGPT搜索和必应的AI增强功能&#xff09;不仅改变了用户获取信息的方式&#xff0c;还为SEO从业…

Node.js心得笔记

npm init 可用npm 来调试node项目 浏览器中的顶级对象时window <ref *1> Object [global] { global: [Circular *1], clearImmediate: [Function: clearImmediate], setImmediate: [Function: setImmediate] { [Symbol(nodejs.util.promisify.custom)]: [Getter] }, cl…

计算机网络01-网站数据传输过程

局域网&#xff1a; 覆盖范围小&#xff0c;自己花钱买设备&#xff0c;宽带固定&#xff0c;自己维护&#xff0c;&#xff0c;一般长度不超过100米&#xff0c;&#xff0c;&#xff0c;带宽也比较固定&#xff0c;&#xff0c;&#xff0c;10M&#xff0c;&#xff0c;&…

Mysql常用函数解析

字符串函数 CONCAT(str1, str2, …) 将多个字符串连接成一个字符串。 SELECT CONCAT(Hello, , World); -- 输出: Hello World​​SUBSTRING(str, start, length) 截取字符串的子串&#xff08;起始位置从1开始&#xff09;。 SELECT SUBSTRING(MySQL, 3, 2); -- 输出: SQ…

SpringMVC 前后端数据交互 中文乱码

ajax 前台传入数据&#xff0c;但是后台接收到的数据中文乱码 首先我们分析一下原因&#xff1a;我们调用接口的时候传入的中文&#xff0c;是没有乱码的 此时我们看一下Java后台接口对应的编码&#xff1a; 默认情况&#xff1a;Servlet容器&#xff08;如Tomcat&#xff09;默…

loads、dumps、jsonpath使用场景

在处理JSON数据时&#xff0c;loads、dumps 和 jsonpath 是三个非常有用的工具或概念。它们各自在不同的场景下发挥作用&#xff0c;让我们一一来看&#xff1a; 1. loads loads 函数是 Python 中 json 模块的一部分&#xff0c;用于将 JSON 格式的字符串解析成 Python 的数据…

Java学习手册:Spring 事务管理

一、事务管理的概念 事务是一组操作的集合&#xff0c;这些操作要么全部成功&#xff0c;要么全部失败。事务管理的目的是保证数据的一致性和完整性。在数据库操作中&#xff0c;事务管理尤为重要&#xff0c;例如银行转账、订单支付等场景都需要事务管理来确保数据的正确性。…