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] Setting metric bound value to None raises an error #1617

Closed
1 of 4 tasks
FlorianJacta opened this issue Jul 31, 2024 · 1 comment
Closed
1 of 4 tasks

[🐛 BUG] Setting metric bound value to None raises an error #1617

FlorianJacta opened this issue Jul 31, 2024 · 1 comment
Assignees
Labels
🖰 GUI Related to GUI 💥Malfunction Addresses an identified problem. 🟨 Priority: Medium Not blocking but should be addressed

Comments

@FlorianJacta
Copy link
Member

FlorianJacta commented Jul 31, 2024

What went wrong? 🤔

Setting the metric bound value to None raises an error and will break the changes done to the UI as an error is raised.

C:\Users\jacta\.conda\envs\develop\lib\site-packages\taipy\gui\gui.py:1477: TaipyGuiWarning: on_action(): Exception raised in 'set_value_to_none()':
Variable 'value' should hold a number: float() argument must be a string or a real number, not 'NoneType'
  _warn(f"on_action(): Exception raised in '{action_function.__name__}()'", e)
C:\Users\jacta\.conda\envs\develop\lib\site-packages\taipy\gui\gui.py:1449: TaipyGuiWarning: on_action(): 'set_value_to_none' is not a valid function.
  _warn(f"on_action(): '{action}' is not a valid function.")

Expected Behavior

It should support the None variable.

Steps to Reproduce Issue

from taipy.gui import Gui
import taipy.gui.builder as tgb

value = None 

def set_value_to_none(state):
    state.value = None

with tgb.Page() as page:
    tgb.metric("{value}")
    tgb.button("Set value to None!", on_action=set_value_to_none)

Gui(page=page).run(title="Frontend Demo")

Version of Taipy

develop

Acceptance Criteria

  • Ensure new code is unit tested, and check code coverage is at least 90%.
  • Create related issue in taipy-doc for documentation and Release Notes.

Code of Conduct

  • I have checked the existing issues.
  • I am willing to work on this issue (optional)
@FlorianJacta FlorianJacta added 🖰 GUI Related to GUI 💥Malfunction Addresses an identified problem. 🟨 Priority: Medium Not blocking but should be addressed labels Jul 31, 2024
@FredLL-Avaiga
Copy link
Member

resolves by #1627

@FredLL-Avaiga FredLL-Avaiga self-assigned this Aug 9, 2024
@jrobinAV jrobinAV closed this as completed Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🖰 GUI Related to GUI 💥Malfunction Addresses an identified problem. 🟨 Priority: Medium Not blocking but should be addressed
Projects
None yet
Development

No branches or pull requests

3 participants