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

Crash when starting second song from list #11

Closed
maciej-gad-benefex opened this issue Jul 5, 2019 · 1 comment
Closed

Crash when starting second song from list #11

maciej-gad-benefex opened this issue Jul 5, 2019 · 1 comment

Comments

@maciej-gad-benefex
Copy link

I'm using yTermPlayer on macOS Mojave, Python 3.7.3. I've got this crash when the app was about to play the second item on a list

Traceback (most recent call last):
  File "/usr/local/bin/yterm", line 10, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.7/site-packages/yTermPlayer/__main__.py", line 28, in main
    loop.run()
  File "/usr/local/lib/python3.7/site-packages/urwid/main_loop.py", line 286, in run
    self._run()
  File "/usr/local/lib/python3.7/site-packages/urwid/main_loop.py", line 384, in _run
    self.event_loop.run()
  File "/usr/local/lib/python3.7/site-packages/urwid/main_loop.py", line 788, in run
    self._loop()
  File "/usr/local/lib/python3.7/site-packages/urwid/main_loop.py", line 821, in _loop
    alarm_callback()
  File "/usr/local/lib/python3.7/site-packages/urwid/main_loop.py", line 172, in cb
    callback(self, user_data)
  File "/usr/local/lib/python3.7/site-packages/yTermPlayer/ui.py", line 71, in update_name
    temp = self.player_object.get_time_details()
  File "/usr/local/lib/python3.7/site-packages/yTermPlayer/music_api.py", line 249, in get_time_details
    total_seconds = round(self.player.duration)
TypeError: type NoneType doesn't define __round__ method
@vaibkumr
Copy link
Owner

vaibkumr commented Jul 6, 2019

Due to some reasons, youtube-dl is sometimes not able to fetch some youtubes.
This exception was handled in the latest commits, whenever fetching of a video fails, next video is automatically played. I just pushed these changes on pypi.
It should no more crash now.
Remember, you need to regularly update youtube-dl for the smooth working of this.

@vaibkumr vaibkumr closed this as completed Jul 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants