How to solve error attributeerror:’pngimagefile’object has no attribute’imshow’ Successfully.
Error:
AttributeError: ‘PngImageFile’ object has no attribute ‘imshow’
Reasons:
Attribute error: the “pngimagefile” object does not have the attribute “imshow”
Solution:
Pngimagefile does not have imshow method, but has show method, so the following changes are required!
Modify
img.imshow()
to
img.show()
Read More:
- [Solved] error: OpenCV(4.5.2) :-1: error: (-5:Bad argument) in function ‘copyMakeBorder‘
- How to Solve Opencv Reads Video Error: cv2.error
- [Solved] vpython: AttributeError: ‘box‘ object has no attribute ‘idx‘
- [Solved] AttributeError: ‘DataParallel‘ object has no attribute ‘save‘
- [Solved] Pycharm error: attributeerror: ‘Htmlparser’ object has no attribute ‘unescape’
- Python writes DICOM file (attributeerror: ‘filemetadataset’ object has no attribute ‘transfersyntax uid’ solution)
- [Solved] AttributeError: ‘NoneType‘ object has no attribute ‘astype‘
- [Solved] AttributeError: ‘DataFrame‘ object has no attribute ‘map‘
- Python+OpenCV: How to Use Background Subtraction Methods
- [Solved] Networkx Error: Attributeerror: ‘graph’ object has no attribute ‘node’
- [Solved] error: (-215:Assertion failed) size.width>0 && size.height>0 in function ‘imshow‘
- [Solved] Python 3.6 Error: ‘dict’ object has no attribute ‘has_key’
- [Solved] Pytorch Error: AttributeError: ‘Tensor‘ object has no attribute ‘backword‘
- [Solved] AttributeError: ‘DataFrame‘ object has no attribute ‘tolist‘
- AttributeError: module ‘time‘ has no attribute ‘clock‘ [How to Solve]
- AttributeError: DatetimeProperties object has no attribute
- Opencv Python realizes the paint filling function in PS, one click filling color and the possible reasons for opencv’s frequent errors
- [Solved] AttributeError: ‘NoneType‘ object has no attribute ‘append‘
- [How to Solve]AttributeError: module ‘scipy’ has no attribute ‘io’
- [Solved] Cv2.imshow Error: window.cpp:1274: error: (-2:Unspecified error) The function is not implemented.