File"c:/Users/李顺/Desktop/脚本.py",line 103,in start_brushself.driver = Browser(driver_name=self.driver_name, executable_path=self.executable_path)File "D:\Anaconda3 libsite-packages splinter browser.py", tine 123,in Browserraise DriverNotFoundError(f'Driver for {driver_name) was not found.')splinter.exceptions.DriverNotFoundError: Driver for chrome was not found是什么问题
时间: 2024-04-02 20:35:41 浏览: 14
这个错误提示说明你的脚本.py文件中使用了splinter库,但是没有找到chrome浏览器的驱动。解决这个问题需要下载并安装chrome浏览器的驱动。
你可以在Chrome浏览器的官网下载对应版本的ChromeDriver。下载地址为:https://sites.google.com/a/chromium.org/chromedriver/downloads
下载后,将解压出的chromedriver.exe文件所在的路径添加到系统环境变量PATH中,或者直接指定executable_path参数为chromedriver.exe文件所在的路径。这样就可以解决该问题了。
相关问题
Traceback (most recent call last): File "C:/Users/李顺/Desktop/脚本.py", line 14, in <module> from Demos.win32cred_demo import pwd, cred File "D:\Anaconda3\lib\site-packages\win32\Demos\win32cred_demo.py", line 23, in <module> win32cred.CredWrite(cred) TypeError: a bytes-like object is required, not 'str'这是什么问题
这个错误是因为在使用win32cred.CredWrite函数时传入了一个字符串对象,但是该函数需要的是一个字节对象。解决方法是将该字符串对象转换为字节对象,可以使用.encode()函数进行转换。例如,将字符串对象str转换为字节对象bytes,可以使用bytes(str, encoding='utf-8')。