spectral: OSError: Unable to determine file type or type not supported for bip image

I have fluorescent microscopy data saved as BIP file and I would like to load it to python. I was following the documentation with:

from spectral import *
img = open_image('path_to_file/Frgrnd.bip')

but I’m getting an error:

~/anaconda3/lib/python3.8/site-packages/spectral/spectral.py in open_image(file)
    117         pass
    118 
--> 119     raise IOError('Unable to determine file type or type not supported.')
    120 
    121 

OSError: Unable to determine file type or type not supported.

Where is the problem and how can I fix it? I’m using: spectral 0.22.1 last updated: Fri Jan 29 2021

CPython 3.8.5 IPython 7.18.1 watermark 2.0.2

Thank you.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 15 (8 by maintainers)

Most upvoted comments

“.bip” isn’t a recognized image file extension so try to open it explicitly like this:

img = spy.envi.open('/path_to_file/Frgrnd.hdr', image='/path_to_file/Frgrnd.bip')