Skip to content

Overflow Error After Querying Sensor Every 2 Seconds for ~2 Hours #67

@DrewMayne

Description

@DrewMayne

The sensor is queried via a long running process (run as a systemd service under the user account pi) which crashes every two hours or so. The process gracefully exit and the service can be immediately restarted but it would be nice if the crash could be avoided.

The following is an except from the log of the most recent crash (all previous instances were reported in an identical fashion):

Mar 18 14:02:51 raspberrypi python3[30114]: De-initializing self.pulse_in
Mar 18 14:02:51 raspberrypi python3[30114]: Traceback (most recent call last):
Mar 18 14:02:51 raspberrypi python3[30114]:   File "/home/pi/climate_regulation/vpd_controller/simple_vpd_controller.py", line 166, in <module>
Mar 18 14:02:51 raspberrypi python3[30114]:     raise error
Mar 18 14:02:51 raspberrypi python3[30114]:   File "/home/pi/climate_regulation/vpd_controller/simple_vpd_controller.py", line 137, in <module>
Mar 18 14:02:51 raspberrypi python3[30114]:     raw_temperature = dhtDevice.temperature
Mar 18 14:02:51 raspberrypi python3[30114]:   File "/home/pi/.local/lib/python3.7/site-packages/adafruit_dht.py", line 244, in temperature
Mar 18 14:02:51 raspberrypi python3[30114]:     self.measure()
Mar 18 14:02:51 raspberrypi python3[30114]:   File "/home/pi/.local/lib/python3.7/site-packages/adafruit_dht.py", line 189, in measure
Mar 18 14:02:51 raspberrypi python3[30114]:     pulses = self._get_pulses_pulseio()
Mar 18 14:02:51 raspberrypi python3[30114]:   File "/home/pi/.local/lib/python3.7/site-packages/adafruit_dht.py", line 119, in _get_pulses_pulseio
Mar 18 14:02:51 raspberrypi python3[30114]:     pulses.append(self.pulse_in.popleft())
Mar 18 14:02:51 raspberrypi python3[30114]: OverflowError: unsigned short is greater than maximum

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions