postlund / pyatv_playground

Playground
MIT License
0 stars 0 forks source link

Test #131

Open postlund opened 3 years ago

postlund commented 3 years ago

Describe the bug push_updates regularly exits with an error about failure to convert a Nan

To Reproduce Run push_updates while the AppleTV is being actively used.

Expected behavior Just updates, no errors.

System Setup (please complete the following information):

Additional context

Here's a stacktrace of the error:

cannot convert float NaN to integer
Traceback (most recent call last):
  File \"/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/asyncio/events.py\", line 88, in _run
    self._context.run(self._callback, *self._args)
  File \"/Users/beers/.local/share/virtualenvs/pyatv-mIjQfnbK/lib/python3.7/site-packages/pyatv/scripts/atvscript.py\", line 40, in playstatus_update
    self.formatter(output_playing(playstatus, self.atv.metadata.app)),
  File \"/Users/beers/.local/share/virtualenvs/pyatv-mIjQfnbK/lib/python3.7/site-packages/pyatv/scripts/atvscript.py\", line 129, in output_playing
    values = {k: _convert(getattr(playing, k)) for k in commands.keys()}
  File \"/Users/beers/.local/share/virtualenvs/pyatv-mIjQfnbK/lib/python3.7/site-packages(pyatv)