Selenium SQLite没有这样的列publicly_routable错误



直到最近,我的程序一直运行良好,代码中没有任何更改。上一次我遇到硒这样的问题是因为我的chrome更新了版本,但这次我的chrom版本没有改变。

我的代码也不使用任何类似SQLite的东西。

Chrome版本:版本94.0.4606.54(官方版本((64位(

我用来启动硒的代码:

def launch_web_driver(self,single_website = False):
if self.web_driver is None or not self.check_if_browser_alive():
user_directory = "C:\Users\bestg\AppData\Local\Google\Chrome\" + self.data_dir
config_options = Options()
config_options.add_argument(f'user-data-dir={user_directory}')
try:
self.launch_message()
self.web_driver = webdriver.Chrome(options = config_options)
self.visit_website(self.initial_url)
except Exception as e:
print(f"Selenium error: n{str(e)}")
if 'user data directory is already in use' in str(e):
url = self.web_driver.command_executor._url       #"http://127.0.0.1:60622/hub"
session_id = self.web_driver.session_id            #'4e167f26-dc1d-4f51-a207-f761eaf73c31
self.web_driver = webdriver.Remote(command_executor=url,desired_capabilities={})
self.web_driver.session_id = session_id

elif single_website and self.web_driver.current_url != self.initial_url:
self.visit_website(self.initial_url)

错误消息:

December 16 2021 03:30:03 PM | Launching web driver
DevTools listening on ws://127.0.0.1:1600/devtools/browser/af61a701-c7dc-408c-b875-367663e26405
[7024:7764:1216/153004.922:ERROR:database.cc(1761)] History SQLite error: code 1 errno 0: no such column: publicly_routable sql: SELECT id,url,visit_time,from_visit,transition,segment_id,visit_duration,incremented_omnibox_typed_score,publicly_routable FROM visits WHERE id=?
[7024:7764:1216/153004.922:ERROR:database.cc(1761)] History SQLite error: code 1 errno 0: no such column: publicly_routable sql: SELECT id,url,visit_time,from_visit,transition,segment_id,visit_duration,incremented_omnibox_typed_score,publicly_routable FROM visits WHERE url=? ORDER BY visit_time DESC, id DESC LIMIT ?
[7024:7764:1216/153004.926:ERROR:database.cc(1761)] History SQLite error: code 1 errno 0: no such column: publicly_routable sql: SELECT id,url,visit_time,from_visit,transition,segment_id,visit_duration,incremented_omnibox_typed_score,publicly_routable FROM visits WHERE url=? ORDER BY visit_time DESC, id DESC LIMIT ?
[7024:7764:1216/153004.938:ERROR:database.cc(1761)] History SQLite error: code 1 errno 0: no such column: publicly_routable sql: SELECT id,url,visit_time,from_visit,transition,segment_id,visit_duration,incremented_omnibox_typed_score,publicly_routable FROM visits WHERE url=? ORDER BY visit_time DESC, id DESC LIMIT ?
[7024:7764:1216/153005.337:ERROR:database.cc(1761)] History SQLite error: code 1 errno 0: no such column: publicly_routable sql: SELECT id,url,visit_time,from_visit,transition,segment_id,visit_duration,incremented_omnibox_typed_score,publicly_routable FROM visits WHERE url=? ORDER BY visit_time DESC, id DESC LIMIT ?
[7024:7764:1216/153006.406:ERROR:database.cc(1761)] History SQLite error: code 1 errno 0: no such column: publicly_routable sql: SELECT id,url,visit_time,from_visit,transition,segment_id,visit_duration,incremented_omnibox_typed_score,publicly_routable FROM visits WHERE url=? ORDER BY visit_time DESC, id DESC LIMIT ?
[7024:18884:1216/153007.485:ERROR:chrome_browser_main_extra_parts_metrics.cc(228)] crbug.com/1216328: Checking Bluetooth availability started. Please report if there is no report that this ends.
[7024:18884:1216/153007.485:ERROR:chrome_browser_main_extra_parts_metrics.cc(231)] crbug.com/1216328: Checking Bluetooth availability ended.
[7024:18884:1216/153007.486:ERROR:chrome_browser_main_extra_parts_metrics.cc(234)] crbug.com/1216328: Checking default browser status started. Please report if there is no report that this ends.
[7024:10988:1216/153007.488:ERROR:device_event_log_impl.cc(214)] [15:30:07.488] USB: usb_device_handle_win.cc:1048 Failed to read descriptor from node connection: A device attached to the system is not functioning. (0x1F)
[7024:10988:1216/153007.490:ERROR:device_event_log_impl.cc(214)] [15:30:07.490] USB: usb_device_handle_win.cc:1048 Failed to read descriptor from node connection: A device attached to the system is not functioning. (0x1F)
[7024:18884:1216/153007.494:ERROR:chrome_browser_main_extra_parts_metrics.cc(238)] crbug.com/1216328: Checking default browser status ended.
[7024:7764:1216/153007.504:ERROR:database.cc(1761)] History SQLite error: code 1 errno 0: no such column: publicly_routable sql: SELECT id,url,visit_time,from_visit,transition,segment_id,visit_duration,incremented_omnibox_typed_score,publicly_routable FROM visits WHERE url=? ORDER BY visit_time DESC, id DESC LIMIT ?

此错误消息。。。

[7024:7764:1216/153004.922:ERROR:database.cc(1761)] History SQLite error: code 1 errno 0: no such column: publicly_routable sql: SELECT id,url,visit_time,from_visit,transition,segment_id,visit_duration,incremented_omnibox_typed_score,publicly_routable FROM visits WHERE id=?
[7024:7764:1216/153004.922:ERROR:database.cc(1761)] History SQLite error: code 1 errno 0: no such column: publicly_routable sql: SELECT id,url,visit_time,from_visit,transition,segment_id,visit_duration,incremented_omnibox_typed_score,publicly_routable FROM visits WHERE url=? ORDER BY visit_time DESC, id DESC LIMIT ?

这意味着ChromeDriver与[tag"googlechrome]版本不兼容。


解决方案

可能您的谷歌Chrome浏览器已更新,您正在使用最新的谷歌Chrome 96.0.4664.110版本,因此您必须下载并安装匹配的ChromeDriver 96.0.4664.45

相关内容

  • 没有找到相关文章

最新更新