You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you empy out the input field (or even use backspace to make '3.' from '3.14') the following error appears on the console:
could not convert string to float: ''
Traceback (most recent call last):
File " <snip> /venv/lib/python3.10/site-packages/nicegui/events.py", line 373, in handle_event
result = handler(arguments) if expects_arguments else handler()
File " <snip> /venv/lib/python3.10/site-packages/nicegui/elements/mixins/value_element.py", line 30, in handle_change
self.set_value(self._event_args_to_value(e))
File " <snip> /venv/lib/python3.10/site-packages/nicegui/elements/number.py", line 97, in _event_args_to_value
return float(e.args)
ValueError: could not convert string to float: ''
(local paths snipped)
This was introduced somewhere after v1.3.6 (that version has a different _event_args_to_value implementation that checks for an empty string)
The text was updated successfully, but these errors were encountered:
Description
Using the basic number input example from the docs:
When you empy out the input field (or even use backspace to make '3.' from '3.14') the following error appears on the console:
(local paths snipped)
This was introduced somewhere after v1.3.6 (that version has a different
_event_args_to_value
implementation that checks for an empty string)The text was updated successfully, but these errors were encountered: