gradio使用过程中的几个报错解决方法

报错1:TypeError: AsyncConnectionPool.__init__() got an unexpected keyword argument 'socket_options'

解决:pip install --upgrade httpx

重启电脑

报错2:ImportError: cannot import name 'Doc' from 'typing_extensions' (C:\ProgramData\anaconda3\Lib\site-packages\typing_extensions.py)

解决:pip install --upgrade fastapi   或者降级

这个可以不重启,如果运行错误没变,就重启一下

报错3:IndexError: single positional indexer is out-of-bounds

解决:数据格式出现问题,修改输入的数据类型,number改为text

报错4:KeyError: 'The `end` argument could not be matched to a location related to the index of the data.'

解决:number输入时,不会变成int格式,在输入变量加int()

其他报错:AttributeError: 'tuple' object has no attribute 'tb_frame'

AttributeError: module 'gradio' has no attribute 'inputs'

UnicodeDecodeError: 'gbk' codec can't decode byte 0xb2 in position 1972: illegal multibyte sequence

解决:关掉vpn,卸载重新安装gradio

pip uninstall  gradio

pip install  gradio

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值