RedditVideoMakerBot icon indicating copy to clipboard operation
RedditVideoMakerBot copied to clipboard

[Bug]: playwright bug

Open Lachine1 opened this issue 3 years ago • 6 comments

Describe the bug

playwright bug

Reproduction Steps

nothing

Expected behavior

┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ Sorry, something went wrong with this version! Try again, and feel free to report this issue at GitHub or the        │
│ Discord community.                                                                                                   │
│ Version: 3.1                                                                                                         │
│ Error: Timeout 30000ms exceeded.                                                                                     │
│ =========================== logs ===========================                                                         │
│ waiting for selector "[data-test-id="post-content"]"                                                                 │
│ ============================================================                                                         │
│ Config: {'allow_nsfw': False, 'theme': 'dark', 'times_to_run': 1, 'opacity': 0.9, 'transition': 0.2, 'storymode':    │
│ False, 'storymodemethod': 1, 'storymode_max_length': 1000, 'resolution_w': '1080', 'resolution_h': 1920,             │
│ 'background': {'background_choice': 'minecraft', 'background_thumbnail': False, 'background_thumbnail_font_family':  │
│ 'arial', 'background_thumbnail_font_size': 96, 'background_thumbnail_font_color': '255,255,255'}, 'tts':             │
│ {'voice_choice': 'tiktok', 'aws_polly_voice': 'Matthew', 'streamlabs_polly_voice': 'Matthew', 'tiktok_voice':        │
│ 'en_us_006', 'tiktok_sessionid': 'REDACTED', 'python_voice': '1', 'py_voice_num': '2', 'silence_duration': 0.3,      │
│ 'no_emojis': True}}                                                                                                  │
└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
Traceback (most recent call last):
  File "C:\Users\użytkownik\Desktop\code\RedditVideoMakerBot\main.py", line 130, in <module>
    raise err
  File "C:\Users\użytkownik\Desktop\code\RedditVideoMakerBot\main.py", line 111, in <module>
    run_many(config["settings"]["times_to_run"])
  File "C:\Users\użytkownik\Desktop\code\RedditVideoMakerBot\main.py", line 64, in run_many
    main()
  File "C:\Users\użytkownik\Desktop\code\RedditVideoMakerBot\main.py", line 52, in main
    get_screenshots_of_reddit_posts(reddit_object, number_of_comments)
  File "C:\Users\użytkownik\Desktop\code\RedditVideoMakerBot\video_creation\screenshot_downloader.py", line 183, in get_screenshots_of_reddit_posts
    raise e
  File "C:\Users\użytkownik\Desktop\code\RedditVideoMakerBot\video_creation\screenshot_downloader.py", line 161, in get_screenshots_of_reddit_posts
    page.locator('[data-test-id="post-content"]').screenshot(
  File "C:\Users\użytkownik\AppData\Local\Programs\Python\Python310\lib\site-packages\playwright\sync_api\_generated.py", line 13139, in screenshot
    self._sync(
  File "C:\Users\użytkownik\AppData\Local\Programs\Python\Python310\lib\site-packages\playwright\_impl\_sync_base.py", line 89, in _sync
    return task.result()
  File "C:\Users\użytkownik\AppData\Local\Programs\Python\Python310\lib\site-packages\playwright\_impl\_locator.py", line 394, in screenshot
    return await self._with_element(
  File "C:\Users\użytkownik\AppData\Local\Programs\Python\Python310\lib\site-packages\playwright\_impl\_locator.py", line 99, in _with_element
    handle = await self.element_handle(timeout=timeout)
  File "C:\Users\użytkownik\AppData\Local\Programs\Python\Python310\lib\site-packages\playwright\_impl\_locator.py", line 219, in element_handle
    handle = await self._frame.wait_for_selector(
  File "C:\Users\użytkownik\AppData\Local\Programs\Python\Python310\lib\site-packages\playwright\_impl\_frame.py", line 307, in wait_for_selector
    await self._channel.send("waitForSelector", locals_to_params(locals()))
  File "C:\Users\użytkownik\AppData\Local\Programs\Python\Python310\lib\site-packages\playwright\_impl\_connection.py", line 43, in send
    return await self._connection.wrap_api_call(
  File "C:\Users\użytkownik\AppData\Local\Programs\Python\Python310\lib\site-packages\playwright\_impl\_connection.py", line 370, in _
    return await result
  File "C:\Users\użytkownik\AppData\Local\Programs\Python\Python310\lib\site-packages\playwright\_impl\_connection.py", line 78, in inner_send
    result = next(iter(done)).result()
playwright._impl._api_types.TimeoutError: Timeout 30000ms exceeded.
=========================== logs ===========================
waiting for selector "[data-test-id="post-content"]"
============================================================

System Information

Operating System : Windows 8.1 Python version : Python 3.10.9 App version / Branch : master

Checklist

  • [x] I have searched the open issues for duplicates.
  • [X] I have shown the entire traceback, if possible.

Additional Context

No response

Lachine1 avatar Apr 29 '23 19:04 Lachine1

This issue is stale because it has been open 7 days with no activity. Remove stale label or comment, or this will be closed in 10 days.

github-actions[bot] avatar May 06 '23 00:05 github-actions[bot]

Did you solved it? I'm having the same problem :(

theduckbusiness avatar May 09 '23 00:05 theduckbusiness

This issue is stale because it has been open 7 days with no activity. Remove stale label or comment, or this will be closed in 10 days.

github-actions[bot] avatar May 16 '23 00:05 github-actions[bot]

I have the same problem :(

Any ideas how to solve it?

ghost avatar May 17 '23 17:05 ghost

I've found a simple way to fix this issue:

First, make sure you're logged into your Reddit account. Then just click on this link: https://www.reddit.com/settings/profile. Now, all you need to do is scroll down until you see the NSFW option and flip the switch to turn it on. That should do the trick!

Apparently the bot was stuck on a page, asking if he wanted to proceed because It's NSFW

@Lachine1 @theduckbusiness

ghost avatar May 18 '23 05:05 ghost

This issue may also be caused if you're using the older reddit design. There's currently some PR's open to address this.

You can switch your reddit account to the new design, or test the following PRs:

  • https://github.com/elebumm/RedditVideoMakerBot/pull/1648
  • https://github.com/elebumm/RedditVideoMakerBot/pull/1663

liamb13 avatar May 24 '23 01:05 liamb13