replit-py icon indicating copy to clipboard operation
replit-py copied to clipboard

Bug/Typo - millaseconds is an invalid keyword argument for new (re-open)

Open drglcc opened this issue 2 years ago • 0 comments

Hi

In trying to use source.duration in the audio library,

  File "/home/runner/Musical-Dice/venv/lib/python3.10/site-packages/replit/audio/__init__.py", line 136, in duration
    return timedelta(millaseconds=self.__payload["Duration"])
TypeError: 'millaseconds' is an invalid keyword argument for __new__()

I saw that issue #6 (https://github.com/replit/replit-py/issues/6) was closed in 2020 as fixed, but I see in the source code

    @property
    def duration(self) -> timedelta:
        """The duration of the source."""
        return timedelta(millaseconds=self.__payload["Duration"])

Thank you for your assistance!

drglcc avatar Apr 15 '23 13:04 drglcc