Skip to content
New issue

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

[BUG] Division by zero in get_windrose_data #192

Closed
Daveiano opened this issue Aug 17, 2023 · 0 comments
Closed

[BUG] Division by zero in get_windrose_data #192

Daveiano opened this issue Aug 17, 2023 · 0 comments
Labels
bug Something isn't working
Milestone

Comments

@Daveiano
Copy link
Owner

Daveiano commented Aug 17, 2023

See https://groups.google.com/g/weewx-user/c/sDK4kzO4vBw/m/LGpxbEAeAQAJ

Division by zero in https://github.com/Daveiano/weewx-wdc/blob/3.x/bin/user/weewx_wdc.py#L2051

weewx[869] ERROR weewx.cheetahgenerator: Evaluation of template /home/pi/weewx-data/skins/weewx-wdc/statistics.html.tmpl failed with exception '<class 'ZeroDivisionError'>'
Aug 16 22:31:32 WeeWx5 weewx[869] ERROR weewx.cheetahgenerator: **** Ignoring template /home/pi/weewx-data/skins/weewx-wdc/statistics.html.tmpl
Aug 16 22:31:32 WeeWx5 weewx[869] ERROR weewx.cheetahgenerator: **** Reason: division by zero
Aug 16 22:31:32 WeeWx5 weewx[869] ERROR weewx.cheetahgenerator: ****  Traceback (most recent call last):
Aug 16 22:31:32 WeeWx5 weewx[869] ERROR weewx.cheetahgenerator: ****    File "/home/pi/weewx-venv/lib/python3.9/site-packages/weewx/cheetahgenerator.py", line 343, in generate
Aug 16 22:31:32 WeeWx5 weewx[869] ERROR weewx.cheetahgenerator: ****      unicode_string = compiled_template.respond()
Aug 16 22:31:32 WeeWx5 weewx[869] ERROR weewx.cheetahgenerator: ****    File "_home_pi_weewx_data_skins_weewx_wdc_statistics_html_tmpl.py", line 258, in respond
Aug 16 22:31:32 WeeWx5 weewx[869] ERROR weewx.cheetahgenerator: ****    File "/home/pi/weewx-venv/lib/python3.9/site-packages/Cheetah/Template.py", line 1708, in _handleCheetahInclude
Aug 16 22:31:32 WeeWx5 weewx[869] ERROR weewx.cheetahgenerator: ****      self._CHEETAH__cheetahIncludes[_includeID].respond(trans)
Aug 16 22:31:32 WeeWx5 weewx[869] ERROR weewx.cheetahgenerator: ****    File "_home_pi_weewx_data_skins_weewx_wdc_includes_body_alternative_inc.py", line 324, in respond
Aug 16 22:31:32 WeeWx5 weewx[869] ERROR weewx.cheetahgenerator: ****    File "/home/pi/weewx-venv/lib/python3.9/site-packages/Cheetah/Template.py", line 1708, in _handleCheetahInclude
Aug 16 22:31:32 WeeWx5 weewx[869] ERROR weewx.cheetahgenerator: ****      self._CHEETAH__cheetahIncludes[_includeID].respond(trans)
Aug 16 22:31:32 WeeWx5 weewx[869] ERROR weewx.cheetahgenerator: ****    File "_home_pi_weewx_data_skins_weewx_wdc_includes_diagram_tile_wind_rose_inc.py", line 276, in respond
Aug 16 22:31:32 WeeWx5 weewx[869] ERROR weewx.cheetahgenerator: ****    File "_home_pi_weewx_data_skins_weewx_wdc_includes_diagram_tile_wind_rose_inc.py", line 120, in __errorCatcher8
Aug 16 22:31:32 WeeWx5 weewx[869] ERROR weewx.cheetahgenerator: ****    File "<string>", line 1, in <module>
Aug 16 22:31:32 WeeWx5 weewx[869] ERROR weewx.cheetahgenerator: ****    File "/home/pi/weewx-data/bin/user/weewx_wdc.py", line 2046, in get_windrose_data
Aug 16 22:31:32 WeeWx5 weewx[869] ERROR weewx.cheetahgenerator: ****      (percent / num_of_values) * 100
Aug 16 22:31:32 WeeWx5 weewx[869] ERROR weewx.cheetahgenerator: ****  ZeroDivisionError: division by zero
@Daveiano Daveiano added the bug Something isn't working label Aug 17, 2023
@Daveiano Daveiano added this to the 3.4.0 milestone Aug 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant