Closed daaa1m closed 10 months ago
Hi Daniel @daaa1m, I've encountered the same issue as you did here. Do you remember how you solved it back then?
yeah @tawagotokado its been a while but if memory serves me right the error comes from the fact that when the bot opens the discord website it can't find the element below likely because the website is calling it something different. i would open up devtools and check the element type and the name then replace it here. hope this helps!
waiting for get_by_role("textbox", name="Message #general")
Ok, thank you very much for your reply! I guess I just need to wait for your update now ^^
yeah @tawagotokado its been a while but if memory serves me right the error comes from the fact that when the bot opens the discord website it can't find the element below likely because the website is calling it something different. i would open up devtools and check the element type and the name then replace it here. hope this helps!
waiting for get_by_role("textbox", name="Message #general")
Oh, I think I know where the problem lies. Do we need to continuously adjust these codes based on the webpage source code?
Not continuously but yeah you need to inspect the web page to make sure the referred element is actually called "textbox" and the name="Message #general", if not then you'd have to change it
ERROR] [/Users/da1m/Code/PythonProj/mj-bot/midjourney_automation_bot/midjourney_automation_script.py:341] - An error occurred while sending the bot command: Timeout 30000ms exceeded. =========================== logs =========================== waiting for get_by_role("textbox", name="Message #general") ============================================================ - [28235:140704443096704] Traceback (most recent call last): File "/Users/da1m/Code/PythonProj/mj-bot/midjourney_automation_bot/midjourney_automation_script.py", line 328, in send_bot_command await chat_bar.fill(command) File "/Users/da1m/Code/PythonProj/mj-bot/venv_py311/lib/python3.11/site-packages/playwright/async_api/_generated.py", line 15963, in fill await self._impl_obj.fill( File "/Users/da1m/Code/PythonProj/mj-bot/venv_py311/lib/python3.11/site-packages/playwright/_impl/_locator.py", line 212, in fill return await self._frame.fill(self._selector, strict=True, **params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/da1m/Code/PythonProj/mj-bot/venv_py311/lib/python3.11/site-packages/playwright/_impl/_frame.py", line 528, in fill await self._channel.send("fill", locals_to_params(locals())) File "/Users/da1m/Code/PythonProj/mj-bot/venv_py311/lib/python3.11/site-packages/playwright/_impl/_connection.py", line 61, in send return await self._connection.wrap_api_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/da1m/Code/PythonProj/mj-bot/venv_py311/lib/python3.11/site-packages/playwright/_impl/_connection.py", line 482, in wrap_api_call return await cb() ^^^^^^^^^^ File "/Users/da1m/Code/PythonProj/mj-bot/venv_py311/lib/python3.11/site-packages/playwright/_impl/_connection.py", line 97, in inner_send result = next(iter(done)).result() ^^^^^^^^^^^^^^^^^^^^^^^^^ playwright._impl._api_types.TimeoutError: Timeout 30000ms exceeded. =========================== logs =========================== waiting for get_by_role("textbox", name="Message #general")
[ERROR] [/Users/da1m/Code/PythonProj/mj-bot/midjourney_automation_bot/midjourney_automation_script.py:281] - An error occurred while opening the channel and entering the bot command: Timeout 30000ms exceeded. =========================== logs =========================== waiting for get_by_role("textbox", name="Message #general") ============================================================ - [28235:140704443096704] [ERROR] [/Users/da1m/Code/PythonProj/mj-bot/midjourney_automation_bot/midjourney_automation_script.py:251] - Error occurred: Timeout 30000ms exceeded. =========================== logs =========================== waiting for get_by_role("textbox", name="Message #general") ============================================================ while executing the main function. - [28235:140704443096704] [ERROR] [/Users/da1m/Code/PythonProj/mj-bot/midjourney_automation_bot/midjourney_automation_script.py:366] - An error occurred while starting the bot: Connection closed - [28235:140704443096704]