-
Notifications
You must be signed in to change notification settings - Fork 91
Description
您好,
我将chrome新获取的两个密钥添加到环境中,在请求对话时还是会报错:
2025-07-03 15:40:06.024 | ERROR | gemini_webapi.utils.load_browser_cookies:load_browser_cookies:49 - Error happened while trying to load cookies from chrome. 'DBUS_SESSION_BUS_ADDRESS'
2025-07-03 15:40:06.024 | ERROR | gemini_webapi.utils.load_browser_cookies:load_browser_cookies:49 - Error happened while trying to load cookies from chromium. 'DBUS_SESSION_BUS_ADDRESS'
2025-07-03 15:40:06.024 | ERROR | gemini_webapi.utils.load_browser_cookies:load_browser_cookies:49 - Error happened while trying to load cookies from opera. 'DBUS_SESSION_BUS_ADDRESS'
2025-07-03 15:40:06.024 | ERROR | gemini_webapi.utils.load_browser_cookies:load_browser_cookies:49 - Error happened while trying to load cookies from opera_gx. 'DBUS_SESSION_BUS_ADDRESS'
2025-07-03 15:40:06.025 | ERROR | gemini_webapi.utils.load_browser_cookies:load_browser_cookies:49 - Error happened while trying to load cookies from brave. 'DBUS_SESSION_BUS_ADDRESS'
2025-07-03 15:40:06.025 | ERROR | gemini_webapi.utils.load_browser_cookies:load_browser_cookies:49 - Error happened while trying to load cookies from edge. 'DBUS_SESSION_BUS_ADDRESS'
2025-07-03 15:40:06.025 | ERROR | gemini_webapi.utils.load_browser_cookies:load_browser_cookies:49 - Error happened while trying to load cookies from vivaldi. 'DBUS_SESSION_BUS_ADDRESS'
INFO:httpx:HTTP Request: GET https://gemini.google.com/app "HTTP/2 502 Bad Gateway"
ERROR:main:Error generating completion: Failed to initialize client. SECURE_1PSIDTS could get expired frequently, please make sure cookie values are up to date. (Failed initialization attempts: 1)
Traceback (most recent call last):
File "/app/main.py", line 310, in create_chat_completion
await gemini_client.init(timeout=300)
File "/app/.venv/lib/python3.12/site-packages/gemini_webapi/client.py", line 190, in init
access_token, valid_cookies = await get_access_token(
^^^^^^^^^^^^^^^^^^^^^^^
File "/app/.venv/lib/python3.12/site-packages/gemini_webapi/utils/get_access_token.py", line 146, in get_access_token
raise AuthError(
gemini_webapi.exceptions.AuthError: Failed to initialize client. SECURE_1PSIDTS could get expired frequently, please make sure cookie values are up to date. (Failed initialization attempts: 1)
以上报错事hf容器部署的,本地部署也是类似的报错:
gemini_webapi.exceptions.AuthError: Failed to initialize client. SECURE_1PSIDTS could get expired frequently, please make sure cookie values are up to date. (Failed initialization attempts: 1)
但是我的SECURE_1PSIDTS和SECURE_1PSID都是最新获取的,我连浏览器都还没有关闭,网页版对话正常,不可能是过期的,这如何解决呢?