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

Access Token: Not found Auth0 did not issue an access token. #23

Closed
quecaaa opened this issue Dec 9, 2022 · 20 comments
Closed

Access Token: Not found Auth0 did not issue an access token. #23

quecaaa opened this issue Dec 9, 2022 · 20 comments

Comments

@quecaaa
Copy link

quecaaa commented Dec 9, 2022

运行app.py之后输入账号密码,然后提示
[OpenAI][5] Captcha saved to captcha.png in the current directory
[32m[OpenAI][5][37mPlease solve the captcha and press enter to continue: FFBrB8
输入验证码之后出现了下面的情况:
[OpenAI][5] Captcha saved to captcha.png in the current directory
[32m[OpenAI][5] [37mPlease solve the captcha and press enter to continue: FFBrB8
[OpenAI][5] Continuing...
[OpenAI][6] Making request to https://auth0.openai.com/u/login/identifier
[OpenAI][6] Email found
[OpenAI][7] Entering password...
[OpenAI][7] Password was correct
[OpenAI][7] Old state: hKFo2SBkMjZaZmFfeXdtMTZoRHVQeFFZSTlKYUd1cWtyVGdaMaFur3VuaXZlcnNhbC1sb2dpbqN0aWTZIHNvbnRMM0xzMmk1a1dCamtFR2ZRN3BWYXg5WUNVczc0o2NpZNkgVGRKSWNiZTE2V29USHROOTVueXl3aDVFNHlPbzZJdEc
[OpenAI][7] New State: sontL3Ls2i5kWBjkEGfQ7pVax9YCUs74
[OpenAI][8] Making request to https://auth0.openai.com/authorize/resume?state=sontL3Ls2i5kWBjkEGfQ7pVax9YCUs74
[OpenAI][8] All good
[OpenAI][8][CRITICAL] Access Token: Not found Auth0 did not issue an access token.
[OpenAI][9] Attempting to get access token from: https://chat.openai.com/api/auth/session
[OpenAI][9] Access Token: Not found, Please try again with a proxy (or use a new proxy if you are using one)

Credentials have been refreshed.

这时弹出了背景设定框,选择确认之后出现

Exception in thread Thread-1:
Traceback (most recent call last):
File "E:\study\python\Anaconda3\lib\threading.py", line 980, in _bootstrap_inner
self.run()
File "E:\study\python\Anaconda3\lib\threading.py", line 917, in run
self._target(*self._args, **self._kwargs)
File "E:\gm\new\ChineseAiDungeonChatGPT-main\app.py", line 207, in _on_login
self.register_storyteller(use_default=False)
File "E:\gm\new\ChineseAiDungeonChatGPT-main\app.py", line 214, in register_storyteller
self.show_background_window()
File "E:\gm\new\ChineseAiDungeonChatGPT-main\app.py", line 170, in show_background_window
result = tkinter.simpledialog.askstring(
File "E:\study\python\Anaconda3\lib\tkinter\simpledialog.py", line 410, in askstring
d = _QueryString(title, prompt, **kw)
File "E:\study\python\Anaconda3\lib\tkinter\simpledialog.py", line 387, in init
QueryDialog.init(self, *args, **kw)
File "E:\study\python\Anaconda3\lib\tkinter\simpledialog.py", line 282, in init
Dialog.init(self, parent, title)
File "E:\study\python\Anaconda3\lib\tkinter\simpledialog.py", line 174, in init
self.wait_visibility()
File "E:\study\python\Anaconda3\lib\tkinter_init
.py", line 705, in wait_visibility
self.tk.call('tkwait', 'visibility', window._w)
_tkinter.TclError: window ".!_querystring" was deleted before its visibility changed
请问是什么原因

@bupticybee
Copy link
Owner

@zxypro1 是否方便看下这个问题呀

@zxypro1
Copy link
Contributor

zxypro1 commented Dec 9, 2022

auth的问题貌似是api更新导致的,可以尝试pip install chatgptpy --upgrade更新一下包。
下面那个tkinter的问题貌似只会在windows平台以及第一次运行app时出现。待我具体看看是怎么回事。
另外Mac貌似会出现杀进程的情况。不知道是只有我的mac这样还是普遍现象。

@quecaaa
Copy link
Author

quecaaa commented Dec 9, 2022

尝试了更新chatgptpy,并不能解决问题

@zxypro1
Copy link
Contributor

zxypro1 commented Dec 9, 2022

那我看一下吧。能发下操作系统还有python版本吗。

@bupticybee
Copy link
Owner

auth的问题貌似是api更新导致的,可以尝试pip install chatgptpy --upgrade更新一下包。 下面那个tkinter的问题貌似只会在windows平台以及第一次运行app时出现。待我具体看看是怎么回事。 另外Mac貌似会出现杀进程的情况。不知道是只有我的mac这样还是普遍现象。

我的mac也有来着,不清楚为什么

@zxypro1
Copy link
Contributor

zxypro1 commented Dec 9, 2022

知道怎么回事了,正在修。

@quecaaa
Copy link
Author

quecaaa commented Dec 9, 2022

操作系统的win10,python版本是3.9.13

@zxypro1
Copy link
Contributor

zxypro1 commented Dec 9, 2022

已合并,在试一下吧@quecaaa

@quecaaa
Copy link
Author

quecaaa commented Dec 10, 2022

下面的情况解决了,但是上面仍然提示
[OpenAI][8][CRITICAL] Access Token: Not found Auth0 did not issue an access token.
[OpenAI][9] Attempting to get access token from: https://chat.openai.com/api/auth/session
[OpenAI][9] Access Token: Not found, Please try again with a proxy (or use a new proxy if you are using one)
但是我进入https://chat.openai.com/api/auth/session里面却可以看到access token

@quecaaa
Copy link
Author

quecaaa commented Dec 10, 2022

似乎出现了新的情况:
Exception in thread Thread-1:
Traceback (most recent call last):
File "E:\study\python\Anaconda3\lib\site-packages\revChatGPT\revChatGPT.py", line 165, in get_chat_text
response = response.text.splitlines()[-4]
IndexError: list index out of range

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "E:\study\python\Anaconda3\lib\site-packages\revChatGPT\revChatGPT.py", line 178, in get_chat_text
raise Exception(
Exception: Missing necessary credentials

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "E:\study\python\Anaconda3\lib\threading.py", line 980, in _bootstrap_inner
self.run()
File "E:\study\python\Anaconda3\lib\threading.py", line 917, in run
self._target(*self._args, **self._kwargs)
File "E:\gm\new\ChineseAiDungeonChatGPT-main\app.py", line 297, in _on_enter_pressed
self._insert_message(msg, "你")
File "E:\gm\new\ChineseAiDungeonChatGPT-main\app.py", line 312, in _insert_message
self.story_teller.action(msg)
File "E:\gm\new\ChineseAiDungeonChatGPT-main\story.py", line 68, in action
resp = self.chatbot.get_chat_response(prompt) # Sends a request to the API and returns the response by OpenAI
File "E:\study\python\Anaconda3\lib\site-packages\revChatGPT\revChatGPT.py", line 223, in get_chat_response
return self.get_chat_text(data)
File "E:\study\python\Anaconda3\lib\site-packages\revChatGPT\revChatGPT.py", line 182, in get_chat_text
raise Exception("Not a JSON response") from exc2
Exception: Not a JSON response

@bupticybee
Copy link
Owner

暂时还没遇到过这个错,一会详细看下

@zxypro1
Copy link
Contributor

zxypro1 commented Dec 10, 2022

Auth0的问题貌似是一个api only的问题,可以关注一下我们使用的api库关于这个的讨论#17,我也在看这个问题的原因。
那个新情况可以说一下是怎么出现的吗? @quecaaa

@quecaaa
Copy link
Author

quecaaa commented Dec 10, 2022

我下载了新的code,运行之后输入验证码,显示的是
[OpenAI][8][CRITICAL] Access Token: Not found Auth0 did not issue an access token.
[OpenAI][9] Attempting to get access token from: https://chat.openai.com/api/auth/session
[OpenAI][9] Access Token: Not found, Please try again with a proxy (or use a new proxy if you are using one)

Credentials have been refreshed.

这时候出现背景设定框,选择确认之后出现
(None, None)
{'Authorization': None}

不过背景倒是打出来了,随便输入内容后确定,出现
Exception in thread Thread-3:
Traceback (most recent call last):
File "E:\study\python\Anaconda3\lib\site-packages\revChatGPT\revChatGPT.py", line 165, in get_chat_text
response = response.text.splitlines()[-4]
IndexError: list index out of range

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "E:\study\python\Anaconda3\lib\site-packages\revChatGPT\revChatGPT.py", line 178, in get_chat_text
raise Exception(
Exception: Missing necessary credentials

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "E:\study\python\Anaconda3\lib\threading.py", line 980, in _bootstrap_inner
self.run()
File "E:\study\python\Anaconda3\lib\threading.py", line 917, in run
self._target(*self._args, **self._kwargs)
File "E:\gm\new\ChineseAiDungeonChatGPT-main\app.py", line 297, in _on_enter_pressed
self._insert_message(msg, "你")
File "E:\gm\new\ChineseAiDungeonChatGPT-main\app.py", line 312, in _insert_message
self.story_teller.action(msg)
File "E:\gm\new\ChineseAiDungeonChatGPT-main\story.py", line 68, in action
resp = self.chatbot.get_chat_response(prompt) # Sends a request to the API and returns the response by OpenAI
File "E:\study\python\Anaconda3\lib\site-packages\revChatGPT\revChatGPT.py", line 223, in get_chat_response
return self.get_chat_text(data)
File "E:\study\python\Anaconda3\lib\site-packages\revChatGPT\revChatGPT.py", line 182, in get_chat_text
raise Exception("Not a JSON response") from exc2
Exception: Not a JSON response
一直在获取chatGPT回复

@zxypro1
Copy link
Contributor

zxypro1 commented Dec 10, 2022

那就是没有获取到token。是一直这样还是偶尔出现?

@zxypro1
Copy link
Contributor

zxypro1 commented Dec 10, 2022

其实也还是Auth0的问题。

@quecaaa
Copy link
Author

quecaaa commented Dec 10, 2022

一直都是这样,使用默认的token也是

@zxypro1
Copy link
Contributor

zxypro1 commented Dec 10, 2022

那应该要用proxy了。等下更新吧。

@JackeyWang777
Copy link

我看pychatgpt中有了proxy 所以proxy直接设置一个外网代理服务器就可以么

那应该要用proxy了。等下更新吧。

@zxypro1
Copy link
Contributor

zxypro1 commented Dec 12, 2022

@JackeyWang777 根据pychatgpt的文档应该是填本地的host。但是现在由于openai的更新,pychatgpt已经用不了了。先等等吧。

@bupticybee
Copy link
Owner

closing

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