xiaogpt icon indicating copy to clipboard operation
xiaogpt copied to clipboard

[Error]运行时报错

Open 2guan opened this issue 2 years ago • 8 comments

运行xiaogpt.py时,报错: /pip/xiaogpt-main# python3 xiaogpt.py --config xiaogptconfig.json Running xiaogpt now, 用帮我开头来提问 Traceback (most recent call last): File "xiaogpt.py", line 458, in asyncio.run(miboy.run_forever()) File "/usr/lib/python3.8/asyncio/runners.py", line 44, in run return loop.run_until_complete(main) File "/usr/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete return future.result() File "xiaogpt.py", line 289, in run_forever await self.init_all_data(session) File "xiaogpt.py", line 141, in init_all_data await self._init_data_hardware() File "xiaogpt.py", line 171, in _init_data_hardware raise Exception(f"we have no hardware: {self.hardware} please check") Exception: we have no hardware: S12A please check

已经使用micli.py获取了设备信息,也填入了xiaogptconfig.json。设备型号:xiaomi.wifispeaker.s12 { "hardware": "S12A", "account": "", "password": "", "openai_key": "***", "cookie": "", "use_command": false, "mute_xiaoai": false, "verbose": false, "use_gpt3": false, "use_chatgpt_api": false }

2guan avatar Mar 03 '23 18:03 2guan

通过命令行参数的形式启动可以吗 是S12 or S12A?

pjq avatar Mar 04 '23 00:03 pjq

通过命令行参数的形式启动可以吗 是S12 or S12A?

试了S12,S12A,都不行,用参数报错也是一致的

2guan avatar Mar 04 '23 02:03 2guan

家里有两款音箱,L07A没在列表中,我手动加上了,启动时就报错。查了spec,调用说话的都是5-1。

"name": "小米AI音箱",
"model": "xiaomi.wifispeaker.s12",
"did": "83384036",


"name": "Redmi小爱音箱Play",
"model": "xiaomi.wifispeaker.l7a",
"did": "385081995",

2guan avatar Mar 04 '23 03:03 2guan

micli ,可以命令行直接调用

pjq avatar Mar 04 '23 03:03 pjq

micli ,可以命令行直接调用

micli调用都没问题,都能说话。5-1就都能直接说。action语句也都可以。

2guan avatar Mar 04 '23 03:03 2guan

“—use_command”

yihong0618 avatar Mar 04 '23 03:03 yihong0618

“—use_command” root@**:/pip/xiaogpt-main# python3 xiaogpt.py --hardware S12A --use_command Running xiaogpt now, 用帮我开头来提问 Traceback (most recent call last): File "xiaogpt.py", line 461, in asyncio.run(miboy.run_forever()) File "/usr/lib/python3.8/asyncio/runners.py", line 44, in run return loop.run_until_complete(main) File "/usr/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete return future.result() File "xiaogpt.py", line 292, in run_forever await self.init_all_data(session) File "xiaogpt.py", line 144, in init_all_data await self._init_data_hardware() File "xiaogpt.py", line 174, in _init_data_hardware raise Exception(f"we have no hardware: {self.hardware} please check") Exception: we have no hardware: S12A please check

2guan avatar Mar 04 '23 04:03 2guan

问题解决了。原因是执行的时候没有加 --use_chatgpt_api 或 --use_gpt3 🤣 S12、L07A都可以支持。

2guan avatar Mar 06 '23 02:03 2guan