imshow misunderstanding ?
"2.bmp" is a valid bitmap file located in the correct folder. So what's wrong with the following code to make it produce the error ...
error: ........\opencv\modules\highgui\src\window.cpp:261: error: (-215) size.width>0 && size.height>0 in function cv::imshow
import cv2
ifile = cv2.imread("C:\Users\ericnei\My Work\2.bmp")
cv2.imshow("Demo",ifile)
cv2.waitKey(0)
cv2.destroyAllWindows()
your image is None / empty / was not loaded.