更新时间:2026-08-05 GMT+08:00
配置校验与错误排查
Entry_point错误场景
| 错误 | 原因 | 解决 |
|---|---|---|
ValueError: Unsupported hardware.type 'xxx' | type未注册。 | 确认包已安装,检查AdapterRegistry.available_types()。 |
ValueError: Failed to load adapter entry_point 'xxx' | 工厂函数import失败。 | 检查模块路径、函数名是否正确、依赖是否安装。 |
TypeError: Adapter factory returned ... | 工厂返回值类型错误。 | 工厂必须返回IRobotHardwareAdapter实例。 |
| entry_point不生效 | 同名被覆盖。 | 使用独特前缀命名(如vendor_robot)。 |
| transformer不生效 | 与内置同名冲突。 | 检查日志is ignored because a builtin。 |
从class_path偏移
# 旧格式(已弃用)
hardware:
type: custom
class_path: "mypackage.MyAdapter"
custom_config: {ip: "192.168.1.xxx"}
# 新格式
hardware:
type: my_robot
config: {ip: "192.168.1.xxx"} xxx_config迁移
# 旧格式(已弃用)
hardware:
type: dummy
dummy_config: {...}
# 新格式
hardware:
type: dummy
config: {...}