Error: (-215:Assertion failed) !ssize.empty() in function 'cv::resize'

Error Message:::::

error Traceback (most recent call last)
in
1 # read the image and resize it to a fixed-size
2 image = cv2.imread(file)
----> 3 image = cv2.resize(image, fixed_size)

error: OpenCV(4.1.1) C:\projects\opencv-python\opencv\modules\imgproc\src\resize.cpp:3720: error: (-215:Assertion failed) !ssize.empty() in function ‘cv::resize’

The Code:::

read the image and resize it to a fixed-size

image = cv2.imread(file)
image = cv2.resize(image, fixed_size)

have you found the solution

I’m not sure, as the OP did not post any code for context, but I’d guess that !ssize.empty() means that reading in the image resulted in an empty object.

And what was the solution?

image = cv2.resize(image, dimensions, cv2.INTER_AREA)