kono-dada / VN-ChatGPT-Translator

207 stars 24 forks source link

failed to connect to chatgpt #1

Open LanRenLan opened 1 year ago

LanRenLan commented 1 year ago

C:\Users\Admin\Documents\git-projects\VN-ChatGPT-Translator>python main.py 1 05:25:00 account 1 will start at 05:25:00... 2023/06/02 17:24:17 INFO Verbose mode active 2023/06/02 17:24:17 INFO Loading undetected Chrome 2023/06/02 17:24:17 INFO patching driver executable C:\Users\Admin\appdata\roaming\undetected_chromedriver\undetected_chromedriver.exe 2023/06/02 17:24:17 INFO expected str, bytes or os.PathLike object, not NoneType 2023/06/02 17:24:17 INFO failed to connect to chatgpt, retrying 1 times

后面重试2 3次也没用,全是 expected str, bytes or os.PathLike object, not NoneType 求助,这之后就没反应了。我install requirements,然后在config里面弄好了对话url,cookies也是从cookies-editor复制的json,直接放在cookies_example.json里了,其他的都没动过 我网络连接是没问题的,可能是cookies有问题吗,我试了在新的浏览器里直接import cookies再刷新是进不去的,但是我在常用的浏览器里删掉所有cookies再import回去就没问题,很奇怪 Windows 11 22H2 22621.1778,chrome 112.0.5615.138,Python 3.11.2,pip 23.1.2,路径下的undetected_chromedriver.exe也是存在的

kono-dada commented 1 year ago

试试修改chatgpt_automation/chatgpt_client.py中70行的version_main为112

kono-dada commented 1 year ago

如果不行的话,试试debug确认bug的具体发生位置

LanRenLan commented 1 year ago

改112也没用。请问debug怎么开,我不太了解

kono-dada commented 1 year ago

试试把undetected_chromedriver.exe的绝对路径写进translator.py第66行构造ChatGPT_Client时的参数“driver_executable_path”中