For native python-seabreeze, if the device has not be opened (dev.open(), usually called in seabreeze.spectrometers.Spectrometer.__init__ ), and some data is requested from the device, it will raise a seabreeze.cseabreeze._wrapper.SeaBreezeError error. This is only relevant if either you are trying to open the same device multiple times (in which case you also need to close the device too), or if you are directly using the seabreeze.cseabreeze.SeaBreezeDevice object which needs to be manually opened.
We should add something like a __assert_open() method to the seatease.cseatease.SeaTeaseDevice object which gets invoked inside every data requesting method call, so that it can raise a SeaBreezeError if the device hasn't been opened.
Also, the seatease.spectrometers.Spectrometer init function should also open the device, and it should be given .open() and .close() wrappers.
For native
python-seabreeze, if the device has not be opened (dev.open(), usually called inseabreeze.spectrometers.Spectrometer.__init__), and some data is requested from the device, it will raise aseabreeze.cseabreeze._wrapper.SeaBreezeErrorerror. This is only relevant if either you are trying to open the same device multiple times (in which case you also need to close the device too), or if you are directly using theseabreeze.cseabreeze.SeaBreezeDeviceobject which needs to be manually opened.We should add something like a
__assert_open()method to theseatease.cseatease.SeaTeaseDeviceobject which gets invoked inside every data requesting method call, so that it can raise aSeaBreezeErrorif the device hasn't been opened.Also, the
seatease.spectrometers.Spectrometerinit function should also open the device, and it should be given.open()and.close()wrappers.