elebumm / RedditVideoMakerBot

Create Reddit Videos with just✨ one command ✨

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug]: Faceplate error

amethode opened this issue · comments

Describe the bug

There is an error when I run the program: "│ Sorry, something went wrong with this version! Try again, and feel free to report this issue at GitHub or the │
│ Discord community. │
│ Version: 3.2.1 │
│ Error: Error: strict mode violation: locator("[name="username"]") resolved to 3 elements: │
│ 1) <input type="text" required="" name="username" id="logi…/> aka locator("input[name="username"]") │
│ 2) <auth-text-input required="" name="username" id="login-username" …>… aka │
│ get_by_text("Username *") │
│ 3) │
│ aka get_by_role("group").filter(has_text="Username *").locator("faceplate-form-helper-text") │
│ │
│ =========================== logs =========================== │
│ waiting for locator("[name="username"]") │
│ ============================================================ │
│ Config: {'allow_nsfw': False, 'theme': 'dark', 'times_to_run': 1, 'opacity': 0.9, 'storymode': False, │
│ 'storymodemethod': 1, 'storymode_max_length': 1000, 'resolution_w': 1080, 'resolution_h': 1920, 'zoom': 1.0, │
│ 'background': {'background_video': 'minecraft', 'background_audio': 'lofi', 'background_audio_volume': 0.25, │
│ 'enable_extra_audio': False, 'background_thumbnail': False, 'background_thumbnail_font_family': 'arial', │
│ 'background_thumbnail_font_size': 96, 'background_thumbnail_font_color': '255,255,255'}, 'tts': {'voice_choice': │
│ 'tiktok', 'random_voice': False, 'elevenlabs_voice_name': 'Bella', 'elevenlabs_api_key': 'REDACTED', │
│ 'aws_polly_voice': 'Matthew', 'streamlabs_polly_voice': 'Matthew', 'tiktok_voice': 'en_us_009', 'tiktok_sessionid': │
│ 'REDACTED', 'python_voice': '1', 'py_voice_num': '2', 'silence_duration': 0.3, 'no_emojis': False}} │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
Traceback (most recent call last):
File "D:\RedditVideoMakerBot\main.py", line 132, in
raise err
File "D:\RedditVideoMakerBot\main.py", line 114, in
run_many(config["settings"]["times_to_run"])
File "D:\RedditVideoMakerBot\main.py", line 69, in run_many
main()
File "D:\RedditVideoMakerBot\main.py", line 53, in main
get_screenshots_of_reddit_posts(reddit_object, number_of_comments)
File "D:\RedditVideoMakerBot\video_creation\screenshot_downloader.py", line 103, in get_screenshots_of_reddit_posts
page.locator('[name="username"]').fill(settings.config["reddit"]["creds"]["username"])
File "C:\Users\Admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\playwright\sync_api_generated.py", line 16045, in fill
self._sync(
File "C:\Users\Admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\playwright_impl_sync_base.py", line 109, in _sync
return task.result()
File "C:\Users\Admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\playwright_impl_locator.py", line 212, in fill
return await self._frame.fill(self._selector, strict=True, **params)
File "C:\Users\Admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\playwright_impl_frame.py", line 528, in fill
await self._channel.send("fill", locals_to_params(locals()))
File "C:\Users\Admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\playwright_impl_connection.py", line 61, in send
return await self._connection.wrap_api_call(
File "C:\Users\Admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\playwright_impl_connection.py", line 482, in wrap_api_call
return await cb()
File "C:\Users\Admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\playwright_impl_connection.py", line 97, in inner_send
result = next(iter(done)).result()
playwright._impl._api_types.Error: Error: strict mode violation: locator("[name="username"]") resolved to 3 elements:
1) <input type="text" required="" name="username" id="logi…/> aka locator("input[name="username"]")
2) <auth-text-input required="" name="username" id="login-username" …>… aka get_by_text("Username *")
3) aka get_by_role("group").filter(has_text="Username *").locator("faceplate-form-helper-text")

=========================== logs ===========================
waiting for locator("[name="username"]")
============================================================"
It just launched the headless browser then chose it, spitting this error, I set headless to False in the \video_creation\screenshot_downloader.py

Reproduction Steps

I tried rerunning it and redownloading but it doesn't

Expected behavior

I expect it to work

Screenshots

image

System Information

Operating System : Windows 11
Python version : Python 3.10.11
App version / Branch : [e.g. latest, V2.0, master, develop]

Checklist

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

Additional Context

No response

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.

Issue closed due to being stale. Please reopen if issue persists in latest version.