spectrometer and system information
- model: HDX
- operating system: CentOS Linux release 7.9.2009
- python version: Python 3.9.16 or 3.11.9
- python-seabreeze version: 2.9.0
- installed-via: conda
current problem
When issuing seabreeze.use() after importing SeaBreezeError, the following warning will be shown:
UserWarning: seabreeze.use has to be called before instantiating a spectrometer
steps to reproduce
The following code will trigger the warning:
import seabreeze
from seabreeze.spectrometers import SeaBreezeError
seabreeze.use("pyseabreeze", network_adapter="192.168.254.200")
On the other hand, just importing the Spectrometer works fine:
import seabreeze
from seabreeze.spectrometers import Spectrometer
seabreeze.use("pyseabreeze", network_adapter="192.168.254.200")
I have not investigated the cause further, but from cross-reading the code, I expected that SeaBreezeError would be lazy-loaded as well?
spectrometer and system information
current problem
When issuing
seabreeze.use()after importingSeaBreezeError, the following warning will be shown:steps to reproduce
The following code will trigger the warning:
On the other hand, just importing the
Spectrometerworks fine:I have not investigated the cause further, but from cross-reading the code, I expected that
SeaBreezeErrorwould be lazy-loaded as well?