gpt4 book ai didi

python - SessionNotCreatedException : Message: session not created from tab crashed in Python with Odoo, 但是 selenium 单独工作很好,

转载 作者:行者123 更新时间:2023-12-04 04:15:48 24 4
gpt4 key购买 nike

我正在使用与 odoo 13 集成的 Selenium
执行代码:

driver = webdriver.Chrome('/home/dev/chromedriver')

来自 odoo。我认为与odoo session 存在一些冲突。但是当我从一个单独的 python 文件执行这段代码时,它运行良好。我还尝试在单击按钮时使用 Django 应用程序执行此代码。它运作良好,浏览器将打开。但在 odoo 项目中它不会工作。我真的很困惑为什么它不起作用。

Odoo Server Error
Traceback (most recent call last):
File "/home/dev/odoo13_home/odoo-13.0/odoo/http.py", line 619, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/home/dev/odoo13_home/odoo-13.0/odoo/http.py", line 309, in _handle_exception
raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
File "/home/dev/odoo13_home/odoo-13.0/odoo/tools/pycompat.py", line 14, in reraise
raise value
File "/home/dev/odoo13_home/odoo-13.0/odoo/http.py", line 664, in dispatch
result = self._call_function(**self.params)
File "/home/dev/odoo13_home/odoo-13.0/odoo/http.py", line 345, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/home/dev/odoo13_home/odoo-13.0/odoo/service/model.py", line 93, in wrapper
return f(dbname, *args, **kwargs)
File "/home/dev/odoo13_home/odoo-13.0/odoo/http.py", line 338, in checked_call
result = self.endpoint(*a, **kw)
File "/home/dev/odoo13_home/odoo-13.0/odoo/http.py", line 909, in __call__
return self.method(*args, **kw)
File "/home/dev/odoo13_home/odoo-13.0/odoo/http.py", line 510, in response_wrap
response = f(*args, **kw)
File "/home/dev/odoo13_home/odoo-13.0/addons/web/controllers/main.py", line 1323, in call_button
action = self._call_kw(model, method, args, kwargs)
File "/home/dev/odoo13_home/odoo-13.0/addons/web/controllers/main.py", line 1311, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/home/dev/odoo13_home/odoo-13.0/odoo/api.py", line 395, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "/home/dev/odoo13_home/odoo-13.0/odoo/api.py", line 382, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "/home/dev/odoo13_home/odoo-13.0/custom_modules_13/testing/models/models.py", line 28, in send_whatsapp_message
driver = webdriver.Remote(service.service_url)
File "/home/dev/odoo13_home/venv/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 152, in __init__
self.start_session(capabilities, browser_profile)
File "/home/dev/odoo13_home/venv/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 250, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "/home/dev/odoo13_home/venv/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 323, in execute
self.error_handler.check_response(response)
File "/home/dev/odoo13_home/venv/lib/python3.7/site-packages/selenium/webdriver/remote/errorhandler.py", line 240, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.SessionNotCreatedException: Message: session not created
from tab crashed
(Session info: chrome=80.0.3987.132)
Stacktrace:
#0 0x560acf67fd29 <unknown>

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com