----> 3 h, w = current_frame.shape 4 motion_field = np.empty((2, (h // block_size + 1), (w // block_size + 1)), dtype=np.int16) 5 AttributeError: 'NoneType' object has no attribute 'shape'
时间: 2024-04-12 08:33:53 浏览: 19
这个错误提示意味着在第3行中,`current_frame` 是一个 NoneType 对象,没有 `shape` 属性。因此,在第4行中,尝试访问 `current_frame` 的 `shape` 属性时会引发 AttributeError 错误。
要解决这个问题,你需要检查 `current_frame` 的来源以及它是否被正确赋值。确保 `current_frame` 是一个有效的图像帧,并且在使用它之前已经正确地初始化。
相关问题
python代码 h, w = current_frame.shape 4 motion_field = np.empty((2, (h // block_size + 1), (w // block_size + 1)), dtype=np.int16) 5 AttributeError: 'NoneType' object has no attribute 'shape'
这个错误提示表明 `current_frame` 是一个 NoneType 对象,没有 `shape` 属性。这意味着 `current_frame` 并没有被正确地赋值或者是赋值为了 None。
要解决这个问题,你需要确保在执行 `current_frame.shape` 前,`current_frame` 已经被正确地初始化并且赋值为一个具有 `shape` 属性的对象。你可以检查一下 `current_frame` 的赋值过程,确保它被正确地赋值为一个图像帧。另外,还要确保你没有在赋值过程中将其设置为 None。
PP->error_current = PP->Set_temperature - current_temp
根据引用\[1\]中的代码,PP->error_current的计算公式为PP->Set_temperature - current_temp。
#### 引用[.reference_title]
- *1* *2* *3* [Linux thermal简述](https://blog.csdn.net/m0_73052512/article/details/131626750)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
相关推荐
![rpm](https://img-home.csdnimg.cn/images/20210720083646.png)
![deb](https://img-home.csdnimg.cn/images/20210720083646.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>图书商城-图书列表</title> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> <script src="https://cdn.bootcss.com/vue/2.5.16/vue.min.js"></script> <script src="https://unpkg.com/axios/dist/axios.min.js"></script> </head> <body> 0">
{{bk.bookName}} ¥{{bk.bookPrice}} <iframe src="footer.html" frameborder="0" scrolling="no" width="100%" height="245px"></iframe> <script src="/BookShopSystem_war/layui/layui.js"></script>这是完整的html代码,请结合你给出的分页功能整合出完整的代码
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)