Using png file with radiomics

Hello everyone, I am working with radiomics and want to use RadiomicsGLCM to extract feature. I want to extract glcm from brain tumor which will be segmented by mask.
Here is my code:
img = sitk.ReadImage(path)
mask = sitk.ReadImage(path) #images are png format
glcm = radiomics.RadiomicsGLCM(img,mask,force2D=2)

But I got an error: min() arg is an empty sequence
Please help me with this problem! Thank u so much in advance!
20201006_115046 20201006_115100

pyradiomics works with single-channel images, see this section of documentation: https://pyradiomics.readthedocs.io/en/latest/faq.html?what-modalities-does-pyradiomics-support-2d-3d-color#what-modalities-does-pyradiomics-support-2d-3d-color

In addition, please use the featureextractor module when computing features, as this also contains multiple steps and checks of image preprocessing and provides much better traceback information.

Using feature classes directly is only intended for developers, as there are many caveats and additional steps to be aware of. This type of use is listed here. For regular use (even when interactively from python scripts, spyder, jupyter notebooks etc), see the usage section in the documentation.