abe-101 / tube-cast

A command-line tool that converts YouTube videos into Anchor FM podcasts
https://pypi.org/project/tube-cast/
MIT License
13 stars 2 forks source link

Runtime error #18

Open abe-101 opened 2 years ago

abe-101 commented 2 years ago
Launching pyppeteer
Trying to log in
Logged in
Uploading audio file
Waiting for upload to finish
Traceback (most recent call last):
  File "/home/thinkpad/.local/bin/tube-cast", line 8, in <module>
    sys.exit(cli())
  File "/home/thinkpad/.local/lib/python3.10/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/home/thinkpad/.local/lib/python3.10/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/home/thinkpad/.local/lib/python3.10/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/thinkpad/.local/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/thinkpad/.local/lib/python3.10/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/home/thinkpad/.local/lib/python3.10/site-packages/click/decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/thinkpad/.local/lib/python3.10/site-packages/src/__main__.py", line 65, in youtube_id_from_file
    convert_youtube_to_podcast(ids, **ctx.obj)
  File "/home/thinkpad/.local/lib/python3.10/site-packages/src/youtube_to_anchorFM.py", line 38, in convert_youtube_to_podcast
    if _convert_youtube_to_podcast(id, **parameters):
  File "/home/thinkpad/.local/lib/python3.10/site-packages/src/youtube_to_anchorFM.py", line 176, in _convert_youtube_to_podcast
    asyncio.run(Lauch())
  File "/usr/lib64/python3.10/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/usr/lib64/python3.10/asyncio/base_events.py", line 646, in run_until_complete
    return future.result()
  File "/home/thinkpad/.local/lib/python3.10/site-packages/src/youtube_to_anchorFM.py", line 124, in Lauch
    await page.waitForXPath(
  File "/home/thinkpad/.local/lib/python3.10/site-packages/pyppeteer/frame_manager.py", line 855, in __await__
    raise result
pyppeteer.errors.TimeoutError: Waiting for XPath "//div[contains(text(),"Save")]/parent::button[not(boolean(@disabled))]" failed: timeout 300000ms exceeds.
Exception ignored in atexit callback: <function Launcher.launch.<locals>._close_process at 0x7fe3b9723130>
Traceback (most recent call last):
  File "/home/thinkpad/.local/lib/python3.10/site-packages/pyppeteer/launcher.py", line 153, in _close_process
    self._loop.run_until_complete(self.killChrome())
  File "/usr/lib64/python3.10/asyncio/base_events.py", line 621, in run_until_complete
    self._check_closed()
  File "/usr/lib64/python3.10/asyncio/base_events.py", line 515, in _check_closed
    raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed
sys:1: RuntimeWarning: coroutine 'Launcher.killChrome' was never awaited
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
abe-101 commented 2 years ago

It would be a good idea if the tool would catch the RuntimeError and retry for that video