alexlaverty / python-reddit-youtube-bot

Automated Reddit Youtube Video Bot
https://www.youtube.com/channel/UCzIwW92D_rM5_yvWBsquSbw
83 stars 19 forks source link

Playwright issue: playwright._impl._api_types.TimeoutError: Timeout 30000ms exceeded. #57

Closed johnnyvng closed 1 year ago

johnnyvng commented 1 year ago

Hi,

Recently I get this error on Ubuntu Linux 20. Not sure what's changed. Please help

... 2023-04-14 18:17:21 INFO Length : 446 2023-04-14 18:17:21 INFO Status : ACCEPTED 2023-04-14 18:17:21 INFO ===== Comment #100===== 2023-04-14 18:17:21 INFO Comment : Tell him you appreciate his socialist stance on work, but you live in a capitalist society. 2023-04-14 18:17:21 INFO Length : 91 2023-04-14 18:17:21 INFO Status : ACCEPTED Downloading screenshots of reddit posts... Launching Headless Browser... Traceback (most recent call last): File "/home/ubuntu/python-reddit-youtube-bot-PEOPLE/app.py", line 321, in process_submissions(submissions) File "/home/ubuntu/python-reddit-youtube-bot-PEOPLE/app.py", line 49, in process_submissions process_submission(submission) File "/home/ubuntu/python-reddit-youtube-bot-PEOPLE/app.py", line 92, in process_submission vid.create(video_directory=video.folder_path, File "/home/ubuntu/python-reddit-youtube-bot-PEOPLE/video_generation/video.py", line 399, in create download_screenshots_of_reddit_posts( File "/home/ubuntu/python-reddit-youtube-bot-PEOPLE/comments/screenshot.py", line 70, in download_screenshots_of_reddit_posts page.locator('[data-test-id="post-content"]').screenshot( File "/home/ubuntu/.local/lib/python3.10/site-packages/playwright/sync_api/_generated.py", line 17227, in screenshot self._sync( File "/home/ubuntu/.local/lib/python3.10/site-packages/playwright/_impl/_sync_base.py", line 104, in _sync return task.result() File "/home/ubuntu/.local/lib/python3.10/site-packages/playwright/_impl/_locator.py", line 491, in screenshot return await self._with_element( File "/home/ubuntu/.local/lib/python3.10/site-packages/playwright/_impl/_locator.py", line 103, in _with_element handle = await self.element_handle(timeout=timeout) File "/home/ubuntu/.local/lib/python3.10/site-packages/playwright/_impl/_locator.py", line 297, in element_handle handle = await self._frame.wait_for_selector( File "/home/ubuntu/.local/lib/python3.10/site-packages/playwright/_impl/_frame.py", line 322, in wait_for_selector await self._channel.send("waitForSelector", locals_to_params(locals())) File "/home/ubuntu/.local/lib/python3.10/site-packages/playwright/_impl/_connection.py", line 61, in send return await self._connection.wrap_api_call( File "/home/ubuntu/.local/lib/python3.10/site-packages/playwright/_impl/_connection.py", line 461, in wrap_api_call return await cb() File "/home/ubuntu/.local/lib/python3.10/site-packages/playwright/_impl/_connection.py", line 96, in inner_send result = next(iter(done)).result() playwright._impl._api_types.TimeoutError: Timeout 30000ms exceeded. =========================== logs =========================== waiting for locator("[data-test-id=\"post-content\"]")

sebbourgeois commented 1 year ago

Same issue as bug reported here : https://github.com/alexlaverty/python-reddit-youtube-bot/issues/42

johnnyvng commented 1 year ago

When type playwright install, Linux says command not found. Something must change in the new update. I'm testing it in Win10 and W16, it runs fine so far.