splintered-reality / py_trees

Python implementation of behaviour trees.
Other
415 stars 139 forks source link

Misleading error message in timers.py. Only float is supported for timer value. #432

Open CleanBandit5595 opened 6 months ago

CleanBandit5595 commented 6 months ago

https://github.com/splintered-reality/py_trees/blob/0d5b39f2f6333c504406d8a63052c456c6bd1ce5/py_trees/timers.py#L59C9-L59C9

if not isinstance(duration, float):
    raise TypeError(
        "Timer: duration should be int or float, but you passed in {}".format(
            type(duration)
        )
    )

The error message is misleading, since int isn't actually supported, only float