When I run the code with headless=True, it doesn't execute.
Steps to Reproduce
I am running the below code:
api = ChatGPT(
session_token,
proxy=None,
disable_moderation=False,
verbose=False,
headless=True
)
message = api.send_message(
"Hey ChatGPT!",
input_mode="INSTANT", # Can be INSTANT or SLOW
input_delay=0.1, # Only used when input_mode is set to SLOW
)
print(message.response, message.conversation_id)
Error Message or Traceback
If applicable, include the complete error message or traceback you received. This will help us in identifying the problem more quickly.
Traceback (most recent call last):
File "venv/lib/python3.10/site-packages/UnlimitedGPT/UnlimitedGPT.py", line 263, in _ensure_cf
WebDriverWait(self.driver, 10).until_not(
File "venv/lib/python3.10/site-packages/UnlimitedGPT/UnlimitedGPT.py", line 118, in until_not
raise TimeoutException(message)
selenium.common.exceptions.TimeoutException: Message:
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "venv/lib/python3.10/site-packages/UnlimitedGPT/UnlimitedGPT.py", line 263, in _ensure_cf
WebDriverWait(self.driver, 10).until_not(
File "venv/lib/python3.10/site-packages/UnlimitedGPT/UnlimitedGPT.py", line 118, in until_not
raise TimeoutException(message)
selenium.common.exceptions.TimeoutException: Message:
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "venv/lib/python3.10/site-packages/UnlimitedGPT/UnlimitedGPT.py", line 263, in _ensure_cf
WebDriverWait(self.driver, 10).until_not(
File "venv/lib/python3.10/site-packages/UnlimitedGPT/UnlimitedGPT.py", line 118, in until_not
raise TimeoutException(message)
selenium.common.exceptions.TimeoutException: Message:
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "venv/lib/python3.10/site-packages/UnlimitedGPT/UnlimitedGPT.py", line 263, in _ensure_cf
WebDriverWait(self.driver, 10).until_not(
File "venv/lib/python3.10/site-packages/UnlimitedGPT/UnlimitedGPT.py", line 118, in until_not
raise TimeoutException(message)
selenium.common.exceptions.TimeoutException: Message:
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/main.py", line 16, in <module>
api = ChatGPT(
File "venv/lib/python3.10/site-packages/UnlimitedGPT/UnlimitedGPT.py", line 77, in __init__
self._init_browser()
File "venv/lib/python3.10/site-packages/UnlimitedGPT/UnlimitedGPT.py", line 189, in _init_browser
self._ensure_cf()
File "venv/lib/python3.10/site-packages/UnlimitedGPT/UnlimitedGPT.py", line 272, in _ensure_cf
return self._ensure_cf(retry - 1)
File "venv/lib/python3.10/site-packages/UnlimitedGPT/UnlimitedGPT.py", line 272, in _ensure_cf
return self._ensure_cf(retry - 1)
File "venv/lib/python3.10/site-packages/UnlimitedGPT/UnlimitedGPT.py", line 272, in _ensure_cf
return self._ensure_cf(retry - 1)
File "venv/lib/python3.10/site-packages/UnlimitedGPT/UnlimitedGPT.py", line 273, in _ensure_cf
raise ValueError("Cloudflare challenge failed")
ValueError: Cloudflare challenge failed
Environment Information
Please provide details about your environment:
Python version: 3.10.9
Operating System: Ventura 13.4
UnlimitedGPT version: 0.1.9.3
Expected Behavior
Describe what you expected to happen when encountering the issue.
Possible Solutions
If you have any ideas or suggestions for resolving the issue, please mention them here.
Checklist
Before submitting the issue, please ensure that you have done the following:
[ ] I have reviewed the documentation before submitting this bug report.
[x] I have confirmed that I am running the latest version of UnlimitedGPT.
[x] I have verified that the issue is not caused by any modifications you made to the library or code.
[ ] I have confirmed that the issue is caused by the library itself and not other dependencies used. [E.G headless mode not working because of undetected-chromedriver]
Thank you for taking the time to report this issue. Your contribution helps improve UnlimitedGPT for everyone!
Description
When I run the code with
headless=True
, it doesn't execute.Steps to Reproduce
I am running the below code:
Error Message or Traceback
If applicable, include the complete error message or traceback you received. This will help us in identifying the problem more quickly.
Environment Information
Please provide details about your environment:
Expected Behavior
Describe what you expected to happen when encountering the issue.
Possible Solutions
If you have any ideas or suggestions for resolving the issue, please mention them here.
Checklist
Before submitting the issue, please ensure that you have done the following:
Thank you for taking the time to report this issue. Your contribution helps improve UnlimitedGPT for everyone!