ChatExchange icon indicating copy to clipboard operation
ChatExchange copied to clipboard

chatexchange.browser.LoginError: failed to get `acct` cookie from Stack Exchange OpenID, check credentials provided for accuracy

Open TvoozMagnificent opened this issue 2 years ago • 2 comments

I ran the command

make

As said. However, it threw an error:

chatexchange.browser.LoginError: failed to get `acct` cookie from Stack Exchange OpenID, check credentials provided for accuracy

Full Python Message:

Traceback (most recent call last):
  File "/Users/luchang/Desktop/ChatBot/examples/chat.py", line 80, in <module>
    main()
  File "/Users/luchang/Desktop/ChatBot/examples/chat.py", line 34, in main
    client.login(email, password)
  File "/Users/luchang/Desktop/ChatBot/chatexchange/client.py", line 169, in login
    cookies = self._br.login_site(self.host, email, password)
  File "/Users/luchang/Desktop/ChatBot/chatexchange/browser.py", line 160, in login_site
    raise LoginError(
chatexchange.browser.LoginError: failed to get `acct` cookie from Stack Exchange OpenID, check credentials provided for accuracy
sys:1: ResourceWarning: unclosed <ssl.SSLSocket fd=7, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('10.4.137.37', 52375), raddr=('151.101.193.69', 443)>
make: *** [run-example] Error 1

Full Output:

# This also creates a link to `chatexchange/` in the Python
# environment, which is neccessary for the other files to be
# able to find it.
rm -rf src/*.egg-info
python3.9 -m pip install -e .
DEPRECATION: Configuring installation scheme with distutils config files is deprecated and will no longer work in the near future. If you are using a Homebrew or Linuxbrew Python, please see discussion at https://github.com/Homebrew/homebrew-core/issues/76621
Obtaining file:///Users/luchang/Desktop/ChatBot
Requirement already satisfied: beautifulsoup4>=4.3.2 in /usr/local/lib/python3.9/site-packages (from ChatExchange==0.0.3) (4.11.1)
Requirement already satisfied: requests>=2.2.1 in /usr/local/lib/python3.9/site-packages (from ChatExchange==0.0.3) (2.27.1)
Requirement already satisfied: websocket-client>=0.13.0 in /usr/local/lib/python3.9/site-packages (from ChatExchange==0.0.3) (1.3.2)
Requirement already satisfied: soupsieve>1.2 in /usr/local/lib/python3.9/site-packages (from beautifulsoup4>=4.3.2->ChatExchange==0.0.3) (2.3.1)
Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.9/site-packages (from requests>=2.2.1->ChatExchange==0.0.3) (3.2)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in /usr/local/lib/python3.9/site-packages (from requests>=2.2.1->ChatExchange==0.0.3) (1.26.7)
Requirement already satisfied: charset-normalizer~=2.0.0 in /usr/local/lib/python3.9/site-packages (from requests>=2.2.1->ChatExchange==0.0.3) (2.0.6)
Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.9/site-packages (from requests>=2.2.1->ChatExchange==0.0.3) (2021.5.30)
Installing collected packages: ChatExchange
  Attempting uninstall: ChatExchange
    Found existing installation: ChatExchange 0.0.3
    Uninstalling ChatExchange-0.0.3:
      Successfully uninstalled ChatExchange-0.0.3
  Running setup.py develop for ChatExchange
Successfully installed ChatExchange-0.0.3
WARNING: You are using pip version 21.2.4; however, version 22.1.2 is available.
You should consider upgrading via the '/usr/local/opt/[email protected]/bin/python3.9 -m pip install --upgrade pip' command.
python3.9 -W default::Warning -m pytest
===================================================================== test session starts ======================================================================
platform darwin -- Python 3.9.7, pytest-7.1.2, pluggy-1.0.0
rootdir: /Users/luchang/Desktop/ChatBot
plugins: timeout-2.1.0
collected 6 items                                                                                                                                              

tests/test_browser.py ..                                                                                                                                 [ 33%]
tests/test_events.py ...                                                                                                                                 [ 83%]
tests/test_markdown.py .                                                                                                                                 [100%]

====================================================================== 6 passed in 0.66s =======================================================================
python3.9 -W default::Warning examples/chat.py
Email: SNIP
Password: SNIP
INFO:chatexchange.client.Client:Logging in.
Traceback (most recent call last):
  File "SNIP/examples/chat.py", line 80, in <module>
    main()
  File "SNIP/examples/chat.py", line 34, in main
    client.login(email, password)
  File "SNIP/chatexchange/client.py", line 169, in login
    cookies = self._br.login_site(self.host, email, password)
  File "SNIP/chatexchange/browser.py", line 160, in login_site
    raise LoginError(
chatexchange.browser.LoginError: failed to get `acct` cookie from Stack Exchange OpenID, check credentials provided for accuracy
sys:1: ResourceWarning: unclosed <ssl.SSLSocket fd=7, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('10.4.137.37', 52375), raddr=('151.101.193.69', 443)>
make: *** [run-example] Error 1

As you can see I manipulated the makefile to use python3.9.

client.log logfile:

SNIP,893: INFO: MainThread: Logging in.

TvoozMagnificent avatar Jun 02 '22 07:06 TvoozMagnificent