'PyPNGImage' object has no attribute 'show'
时间: 2023-08-31 13:08:10 浏览: 349
QComboBox多选下拉框,可点击删除
这个错误是由于'PyPNGImage'对象没有'show'属性引起的。在Windows 7下,使用PIL库中的Image模块的'show'函数时可能会遇到问题。解决方法是修改PIL库中的ImageShow.py文件的第99行,将其替换为以下代码:
return "start /wait %s && PING 127.0.0.1 -n 5 > NUL && del /f %s" % (file, file)。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* [成功解决AttributeError: ‘PngImageFile‘ object has no attribute ‘imshow](https://blog.csdn.net/qq_41185868/article/details/126058418)[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^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *3* [Python-----PIL Image模块 show函数不能正常显示图片](https://blog.csdn.net/chaoshengmingyue/article/details/51901879)[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^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文