fix: 修复运行错误
- algorithms.py 添加 threading/redis/logger 导入 - ResultReporter 添加 report_heartbeat() 和 close() 方法
This commit is contained in:
@@ -159,3 +159,44 @@ Traceback (most recent call last):
|
||||
File "C:\Users\16337\miniconda3\envs\yolo\lib\socket.py", line 845, in create_connection
|
||||
sock.connect(sa)
|
||||
ConnectionRefusedError: [WinError 10061] 由于目标计算机积极拒绝,无法连接。
|
||||
2026-01-30 15:08:56 | ERROR | main | 算法管理器初始化失败: name 'threading' is not defined
|
||||
Traceback (most recent call last):
|
||||
File "C:\Users\16337\PycharmProjects\ai_edge\main.py", line 124, in _init_algorithm_manager
|
||||
self._algorithm_manager = AlgorithmManager()
|
||||
File "C:\Users\16337\PycharmProjects\ai_edge\algorithms.py", line 267, in __init__
|
||||
self._update_lock = threading.Lock()
|
||||
NameError: name 'threading' is not defined
|
||||
2026-01-30 15:08:56 | ERROR | main | 心跳上报失败: 'ResultReporter' object has no attribute 'report_heartbeat'
|
||||
Traceback (most recent call last):
|
||||
File "C:\Users\16337\PycharmProjects\ai_edge\main.py", line 374, in heartbeat
|
||||
self._reporter.report_heartbeat("edge_inference_device", status)
|
||||
AttributeError: 'ResultReporter' object has no attribute 'report_heartbeat'
|
||||
2026-01-30 15:09:26 | ERROR | main | 心跳上报失败: 'ResultReporter' object has no attribute 'report_heartbeat'
|
||||
Traceback (most recent call last):
|
||||
File "C:\Users\16337\PycharmProjects\ai_edge\main.py", line 374, in heartbeat
|
||||
self._reporter.report_heartbeat("edge_inference_device", status)
|
||||
AttributeError: 'ResultReporter' object has no attribute 'report_heartbeat'
|
||||
2026-01-30 15:09:56 | ERROR | main | 心跳上报失败: 'ResultReporter' object has no attribute 'report_heartbeat'
|
||||
Traceback (most recent call last):
|
||||
File "C:\Users\16337\PycharmProjects\ai_edge\main.py", line 374, in heartbeat
|
||||
self._reporter.report_heartbeat("edge_inference_device", status)
|
||||
AttributeError: 'ResultReporter' object has no attribute 'report_heartbeat'
|
||||
2026-01-30 15:10:26 | ERROR | main | 心跳上报失败: 'ResultReporter' object has no attribute 'report_heartbeat'
|
||||
Traceback (most recent call last):
|
||||
File "C:\Users\16337\PycharmProjects\ai_edge\main.py", line 374, in heartbeat
|
||||
self._reporter.report_heartbeat("edge_inference_device", status)
|
||||
AttributeError: 'ResultReporter' object has no attribute 'report_heartbeat'
|
||||
2026-01-30 15:11:59 | ERROR | main | 算法管理器初始化失败: name 'logger' is not defined
|
||||
Traceback (most recent call last):
|
||||
File "C:\Users\16337\PycharmProjects\ai_edge\algorithms.py", line 293, in start_config_subscription
|
||||
redis_client = redis.Redis(
|
||||
NameError: name 'redis' is not defined
|
||||
|
||||
During handling of the above exception, another exception occurred:
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "C:\Users\16337\PycharmProjects\ai_edge\main.py", line 125, in _init_algorithm_manager
|
||||
self._algorithm_manager.start_config_subscription()
|
||||
File "C:\Users\16337\PycharmProjects\ai_edge\algorithms.py", line 313, in start_config_subscription
|
||||
logger.error(f"启动配置订阅失败: {e}")
|
||||
NameError: name 'logger' is not defined
|
||||
|
||||
Reference in New Issue
Block a user