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

IndexError: list index out of range #5

Closed
yinzhangyue opened this issue Dec 6, 2022 · 7 comments
Closed

IndexError: list index out of range #5

yinzhangyue opened this issue Dec 6, 2022 · 7 comments

Comments

@yinzhangyue
Copy link

auth.py", line 357, in part_eight

access_token = re.findall(r"accessToken\":\"(.*)\"", next_data.text)[0]

IndexError: list index out of range

@Aiedails
Copy link

Aiedails commented Dec 6, 2022

Same issue. It seems that there's no accessToken in next_data.text. Maybe the responds format from openai has changed?

@cretaceous-creature
Copy link

mark, the same.
Besides, if proxy is added, following error occurs
[OpenAI] Password: xia******* [OpenAI] Using proxy: http://127.0.0.1:1080 Traceback (most recent call last): File "main.py", line 43, in <module> open_ai_auth.begin() File "/home/chen/Desktop/PyChatGPT/Classes/auth.py", line 109, in begin self.session.proxies(proxies) TypeError: 'dict' object is not callable

@rawandahmad698
Copy link
Owner

Hi, Please try again using a proxy, this is because of rate limiting, We use https://webshare.io proxies and I just tested the code again, everything words ok

@rawandahmad698
Copy link
Owner

mark, the same.
Besides, if proxy is added, following error occurs
[OpenAI] Password: xia******* [OpenAI] Using proxy: http://127.0.0.1:1080 Traceback (most recent call last): File "main.py", line 43, in <module> open_ai_auth.begin() File "/home/chen/Desktop/PyChatGPT/Classes/auth.py", line 109, in begin self.session.proxies(proxies) TypeError: 'dict' object is not callable

Okay, thank you for this, This should've been self.session.proxies = proxies it's now fixed

@cretaceous-creature
Copy link

mark, the same.
Besides, if proxy is added, following error occurs
[OpenAI] Password: xia******* [OpenAI] Using proxy: http://127.0.0.1:1080 Traceback (most recent call last): File "main.py", line 43, in <module> open_ai_auth.begin() File "/home/chen/Desktop/PyChatGPT/Classes/auth.py", line 109, in begin self.session.proxies(proxies) TypeError: 'dict' object is not callable

Okay, thank you for this, This should've been self.session.proxies = proxies it's now fixed

Thank you, for me the same proxy it worked after the new commit, but not now.
[OpenAI] Using proxy: http://127.0.0.1:1080 [OpenAI] Beginning auth process [OpenAI][1] Making request to https://chat.openai.com/auth/login Traceback (most recent call last): File "main.py", line 46, in <module> open_ai_auth.begin() File "/home/chen/Desktop/PyChatGPT/Classes/auth.py", line 124, in begin response = self.session.get(url=url, headers=headers) File "/home/chen/.local/lib/python3.8/site-packages/tls_client/sessions.py", line 343, in get return self.execute_request(method="GET", url=url, **kwargs) File "/home/chen/.local/lib/python3.8/site-packages/tls_client/sessions.py", line 326, in execute_request raise TLSClientExeption(response_object["body"]) tls_client.exceptions.TLSClientExeption: failed to do request: Get "https://chat.openai.com/auth/login": unexpected EOF

@rawandahmad698
Copy link
Owner

Retry the request.

@cretaceous-creature
Copy link

Retry the request.

Thanks, I figure out that I am using an trojan proxy, which is socks not http lol.

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

4 participants