Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to find the text prompt area. Please raise an issue with verbose=True #62

Open
ishandutta2007 opened this issue Feb 27, 2024 · 6 comments

Comments

@ishandutta2007
Copy link

ishandutta2007 commented Feb 27, 2024

Code:

from talkingheads import ChatGPTClient
chathead = ChatGPTClient(
    cold_start=True,
    incognito=False,
    headless=False,
    user_data_dir='/Users/ishandutta2007/Library/Application Support/BraveSoftware/Brave-Browser/Default'
)
answer = chathead.interact("Hello, how are you today")
print(answer)

Command:

python mycodefile.py  --verbose=True

Error:

Traceback (most recent call last):
File "index.py", line 65, in
answer = chathead.interact("Hello, how are you today")
File "/Users/ishandutta2007/.pyenv/versions/3.8.0/lib/python3.8/site-packages/talkingheads/model_library/chatgpt.py", line 133, in interact
raise RuntimeError(
RuntimeError: Unable to find the text prompt area. Please raise an issue with verbose=True

  • I am facing same issue with HuggingChatClient as well. For Claude and Gemini the webdriver launches just fine for me to login.
  • I am on OSX 10.15
  • My python version is 3.8.0
@ishandutta2007 ishandutta2007 changed the title AttributeError: 'ChatGPTClient' object has no attribute 'browser' Unable to find the text prompt area. Please raise an issue with verbose=True Feb 27, 2024
@ishandutta2007
Copy link
Author

ishandutta2007 commented Feb 27, 2024

Probably it looks for prompt box assuming the login is already done, but it is not.
Even though ChatGPT_UNAME and ChatGPT_PWD that I exported is correct but
The thing is OpenAI username-password login rarely works for me, so I always chose login with google which always works. Maybe thats the issue, is there a option to enable login with google ?

@ishandutta2007
Copy link
Author

ishandutta2007 commented Feb 27, 2024

For HuggingChat there's an additional popup which ask you to confirm . probably thats what makes the prompt box invisible.

Traceback (most recent call last):
File "index.py", line 117, in
answer = chathead.interact("Hello, how are you today")
File "/Users/ishandutta2007/.pyenv/versions/3.8.0/lib/python3.8/site-packages/talkingheads/model_library/huggingchat.py", line 85, in interact
text_area.send_keys(each_line)
File "/Users/ishandutta2007/.pyenv/versions/3.8.0/lib/python3.8/site-packages/selenium/webdriver/remote/webelement.py", line 231, in send_keys
self._execute(
File "/Users/ishandutta2007/.pyenv/versions/3.8.0/lib/python3.8/site-packages/selenium/webdriver/remote/webelement.py", line 395, in _execute
return self._parent.execute(command, params)
File "/Users/ishandutta2007/.pyenv/versions/3.8.0/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 347, in execute
self.error_handler.check_response(response)
File "/Users/ishandutta2007/.pyenv/versions/3.8.0/lib/python3.8/site-packages/selenium/webdriver/remote/errorhandler.py", line 229, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.ElementNotInteractableException: Message: element not interactable
(Session info: chrome=122.0.6261.69)

@ugorsahin
Copy link
Owner

For HuggingChat, have you logged in the UI to accept Privacy and Terms?

For ChatGPT, it seems like you are not in the chat page but somewhere else, perhaps in robot verification page. I will take a look at that

@ishandutta2007
Copy link
Author

@ugorsahin I use hugging chat, so I am aware of login. Just one click to accept the popup is required in case it pops up, maybe it's browser specific (I am on Brave).

I'll try to send you a pull requests when I have time. Its simpler that way than trying to explain here.

@ugorsahin
Copy link
Owner

Hmm, that's strange. I've tried several times, but I still can't seem to encounter the popup you mentioned. Could you please send me a screenshot of the popup? Popups are frustrating, but I'm sure we'll figure out a solution.

@isMMa
Copy link

isMMa commented Apr 3, 2024

I have the same error:

imagen

imagen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants