进程已完成,python中存在退出代码1错误

进程已完成,python中存在退出代码1错误,python,automation,pycharm,selenium-chromedriver,Python,Automation,Pycharm,Selenium Chromedriver,我正在尝试在预设的时间内自动处理whatsapp消息。我使用pyide 参见示例代码 from selenium import webdriver from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.common.keys import Keys from se

我正在尝试在预设的时间内自动处理whatsapp消息。我使用pyide

参见示例代码

from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.by import By
import time

# Replace below path with the absolute path
# to chromedriver in your computer
driver = webdriver.Chrome('/home/saket/Downloads/chromedriver')

driver.get("https://web.whatsapp.com/")
wait = WebDriverWait(driver, 600)

# Replace 'Friend's Name' with the name of your friend 
# or the name of a group 
target = '"Friend\'s Name"'

# Replace the below string with your own message
string = "Message sent using Python!!!"

x_arg = '//span[contains(@title,' + target + ')]'
group_title = wait.until(EC.presence_of_element_located((
    By.XPATH, x_arg)))
group_title.click()
inp_xpath = '//div[@class="input"][@dir="auto"][@data-tab="1"]'
input_box = wait.until(EC.presence_of_element_located((
    By.XPATH, inp_xpath)))
for i in range(100):
    input_box.send_keys(string + Keys.ENTER)
    time.sleep(1)
我从你那里得到了这个密码

我将计算机中的chromedriver路径替换为C:\Users\public\chromedriver.exe,但点击运行按钮后显示路径错误

这是截图


尽管位置正确,你能告诉我为什么会这样吗

您的错误消息截图(不要这样做!发布文本!)显示的源代码与您发布的源代码不同


您必须退出路径中的
\
,因此
C:\Users
应该是
C:\\Users

请阅读以了解为什么发布代码/错误消息的屏幕截图不好。同时发布产生错误的实际代码——让别人尽可能容易地帮助你。现在,有人愿意帮助您复制代码,编辑您的更改,查看错误的屏幕截图,再次手动键入更改,以达到重现错误的目的。此外,在此快速搜索错误,可能会给您带来多个类似问题,当然,克里斯蒂安,我是新来的,谢谢。