Skip to content

Weather widget crashes YASB when tooltip enabled (ValueError: invalid literal for int() with base 10: '0.0') #690

@jasonboi

Description

@jasonboi

Windows version

Windows 11

Windows OS build

25H2

YASB version installed

YASB: v1.8.7

Describe the bug

When the Weather widget has tooltips enabled, YASB can crash/restart with an unhandled ValueError while updating the label/tooltip. Disabling the tooltip (tooltip: false) avoids the crash.

Configure the weather widget and enable tooltip:
weather:
type: "yasb.weather.WeatherWidget"
options:
label: "{icon} {temp}"
label_alt: "{icon} {location}: {temp}, Min {min_temp}, Max {max_temp}, Wind {wind}"
api_key: ""
location: "xxx"
update_interval: 600
hide_decimal: true
tooltip: true
2. Start YASB and wait for a weather refresh (or trigger update).
3. Observe YASB crashes/restarts.

Relevant log output

[ERROR] [MainThread] [root/main.py:171]: Unhandled exception
Traceback (most recent call last):
  File "D:\a\yasb\yasb\src\core\widgets\yasb\weather.py", line 69, in <lambda>
  File "D:\a\yasb\yasb\src\core\widgets\yasb\weather.py", line 465, in _update_label
ValueError: invalid literal for int() with base 10: '0.0'

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateThis issue or pull request already exists

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions