ap--/python-seabreeze

Overflow, still alive and well

drmcnelson opened this issue · 1 comments

The USB2000 still fails, sporadically. The failure occurs most typically at first invocation after a cold start. After that, we restart the python program and it runs normally. Here is the traceback and error message:

Traceback (most recent call last):
  File "/home/nelson/Projects/TeensyDataAcquistion/Python_Programs/TDAQ2Controller.py", line 3062, in <module>
    tdaq2device.commandlineprocessor( name="TDAQ2", fileprefix=None )
  File "/home/nelson/Projects/TeensyDataAcquistion/Python_Programs/TDAQ2Controller.py", line 2855, in commandlineprocessor
    self.commandlineprocessor_( line, fileprefix )
  File "/home/nelson/Projects/TeensyDataAcquistion/Python_Programs/TDAQ2Controller.py", line 2492, in commandlineprocessor_
    resp = self.seabreeze.startTriggered( nrepeats, None, None, doadd=True )
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/nelson/Projects/TeensyDataAcquistion/Python_Programs/SeaBreezeInstrument.py", line 632, in startTriggered
    self.requestspectrum( )
  File "/home/nelson/Projects/TeensyDataAcquistion/Python_Programs/SeaBreezeInstrument.py", line 398, in requestspectrum
    return self.dev.intensities()/self.dev.max_intensity
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/nelson/.local/lib/python3.11/site-packages/seabreeze/spectrometers.py", line 212, in intensities
    out = self._dev.f.spectrometer.get_intensities()
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/nelson/.local/lib/python3.11/site-packages/seabreeze/pyseabreeze/features/spectrometer.py", line 621, in get_intensities
    tmp = self._get_spectrum_raw()
          ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/nelson/.local/lib/python3.11/site-packages/seabreeze/pyseabreeze/features/spectrometer.py", line 171, in _get_spectrum_raw
    self.protocol.receive(
  File "/home/nelson/.local/lib/python3.11/site-packages/seabreeze/pyseabreeze/protocol.py", line 712, in receive
    return self.transport.read(
           ^^^^^^^^^^^^^^^^^^^^
  File "/home/nelson/.local/lib/python3.11/site-packages/seabreeze/pyseabreeze/transport.py", line 221, in read
    ret: bytes = self._device.pyusb_device.read(
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/usb/core.py", line 1029, in read
    ret = fn(
          ^^^
  File "/usr/lib/python3.11/site-packages/usb/backend/libusb1.py", line 846, in bulk_read
    return self.__read(self.lib.libusb_bulk_transfer,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/usb/backend/libusb1.py", line 954, in __read
    _check(retval)
  File "/usr/lib/python3.11/site-packages/usb/backend/libusb1.py", line 604, in _check
    raise USBError(_strerror(ret), ret, _libusb_errno[ret])
usb.core.USBError: [Errno 75] Overflow

spectrometer and system information

  • model: USB2000
  • operating system: Fedora 37, 64bit
  • python version: 3.11
  • python-seabreeze version: 2.4.0
  • installed-via: pip

Still crashing, here is the traceback

stopTriggered
setTriggerMode normal 0
stopTriggered done
Traceback (most recent call last):
  File "/home/nelson/Projects/TeensyDataAcquistion/Python_Programs/TDAQ2Controller.py", line 3062, in <module>
    tdaq2device.commandlineprocessor( name="TDAQ2", fileprefix=None )
  File "/home/nelson/Projects/TeensyDataAcquistion/Python_Programs/TDAQ2Controller.py", line 2855, in commandlineprocessor
    self.commandlineprocessor_( line, fileprefix )
  File "/home/nelson/Projects/TeensyDataAcquistion/Python_Programs/TDAQ2Controller.py", line 1864, in commandlineprocessor_
    if not self.commandlineprocessor_( line__, fileprefix ):
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/nelson/Projects/TeensyDataAcquistion/Python_Programs/TDAQ2Controller.py", line 1788, in commandlineprocessor_
    if not self.commandlineprocessor_( line_, fileprefix ):
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/nelson/Projects/TeensyDataAcquistion/Python_Programs/TDAQ2Controller.py", line 1788, in commandlineprocessor_
    if not self.commandlineprocessor_( line_, fileprefix ):
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/nelson/Projects/TeensyDataAcquistion/Python_Programs/TDAQ2Controller.py", line 1860, in commandlineprocessor_
    if not self.commandlineprocessor_( line___, fileprefix ):
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/nelson/Projects/TeensyDataAcquistion/Python_Programs/TDAQ2Controller.py", line 1788, in commandlineprocessor_
    if not self.commandlineprocessor_( line_, fileprefix ):
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/nelson/Projects/TeensyDataAcquistion/Python_Programs/TDAQ2Controller.py", line 2492, in commandlineprocessor_
    resp = self.seabreeze.startTriggered( nrepeats, None, None, doadd=True )
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/nelson/Projects/TeensyDataAcquistion/Python_Programs/SeaBreezeInstrument.py", line 632, in startTriggered
    self.requestspectrum( )
  File "/home/nelson/Projects/TeensyDataAcquistion/Python_Programs/SeaBreezeInstrument.py", line 398, in requestspectrum
    return self.dev.intensities()/self.dev.max_intensity
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/nelson/.local/lib/python3.11/site-packages/seabreeze/spectrometers.py", line 212, in intensities
    out = self._dev.f.spectrometer.get_intensities()
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/nelson/.local/lib/python3.11/site-packages/seabreeze/pyseabreeze/features/spectrometer.py", line 621, in get_intensities
    tmp = self._get_spectrum_raw()
          ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/nelson/.local/lib/python3.11/site-packages/seabreeze/pyseabreeze/features/spectrometer.py", line 171, in _get_spectrum_raw
    self.protocol.receive(
  File "/home/nelson/.local/lib/python3.11/site-packages/seabreeze/pyseabreeze/protocol.py", line 712, in receive
    return self.transport.read(
           ^^^^^^^^^^^^^^^^^^^^
  File "/home/nelson/.local/lib/python3.11/site-packages/seabreeze/pyseabreeze/transport.py", line 221, in read
    ret: bytes = self._device.pyusb_device.read(
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/usb/core.py", line 1029, in read
    ret = fn(
          ^^^
  File "/usr/lib/python3.11/site-packages/usb/backend/libusb1.py", line 846, in bulk_read
    return self.__read(self.lib.libusb_bulk_transfer,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/usb/backend/libusb1.py", line 954, in __read
    _check(retval)
  File "/usr/lib/python3.11/site-packages/usb/backend/libusb1.py", line 604, in _check
    raise USBError(_strerror(ret), ret, _libusb_errno[ret])
usb.core.USBError: [Errno 75] Overflow
SeaBreezeInstrument close