We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When the pop() runs from the code below:
sensor.py: for measurement_time in self._measurements.keys(): if measurement_time < (now - self._period): _LOGGER.debug( "period_rain update_data_from_sensor removed (%s: %s)", datetime.fromtimestamp(measurement_time).isoformat(), self._measurements[measurement_time] ) self._measurements.pop(measurement_time) else: total += self._measurements[measurement_time]
you get the exception: RuntimeError: dictionary changed size during iteration
RuntimeError: dictionary changed size during iteration
A possible fix is: for measurement_time in list(self._measurements.keys()):
for measurement_time in list(self._measurements.keys()):
The text was updated successfully, but these errors were encountered:
No branches or pull requests
When the pop() runs from the code below:
you get the exception:
RuntimeError: dictionary changed size during iteration
A possible fix is:
for measurement_time in list(self._measurements.keys()):
The text was updated successfully, but these errors were encountered: