-
Notifications
You must be signed in to change notification settings - Fork 185
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
Fixing ZeroDivisionError
thrown by UI sliders when the value_range
is zero (0)
#645
Conversation
Codecov Report
@@ Coverage Diff @@
## master #645 +/- ##
==========================================
- Coverage 52.04% 51.02% -1.03%
==========================================
Files 108 108
Lines 23812 23894 +82
Branches 2631 2631
==========================================
- Hits 12394 12192 -202
- Misses 11013 11293 +280
- Partials 405 409 +4
|
Hello @ganimtron-10, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @ganimtron-10, I tried this with this animation example and the Fox
model. It was causing ZeroDivisionError
previously. It's working fine now 👍🏽.
I still need to check this with different models, I'll let you know if I find anything.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hi @ganimtron-10,
The fix looks good to me. however, the tests are weird.... Can you update your tests? thanks
Hi @ganimtron-10 ,
|
Thank You @m-agour for the suggestion. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks @ganimtron-10 and @m-agour ! merging
Currently, the UI sliders throw
ZeroDivisionError
whenever thevalue_range
is zero ie. min_value and max_value are the same.Adding checks to avoid these errors and setting the handle at the start.