TA的每日心情 | 开心 2021-12-13 21:45 |
---|
签到天数: 15 天 [LV.4]偶尔看看III
|
脚本没有报错,但是有底色标记部分语句,运行后报错信息如下:
C:\Users\liushuang\AppData\Local\Programs\python\Python36-32\python.exe C:/Users/liushuang/PycharmProjects/11/人员管理/人员清单.py
Traceback (most recent call last):
File "C:/Users/liushuang/PycharmProjects/11/人员管理/人员清单.py", line 2, in <module>
from selenium import webdriver
File "C:\Users\liushuang\AppData\Local\Programs\Python\Python36-32\lib\site-packages\selenium\webdriver\__init__.py", line 18, in <module>
from .firefox.webdriver import WebDriver as Firefox # noqa
File "C:\Users\liushuang\AppData\Local\Programs\Python\Python36-32\lib\site-packages\selenium\webdriver\firefox\webdriver.py", line 29, in <module>
from selenium.webdriver.remote.webdriver import WebDriver as RemoteWebDriver
File "C:\Users\liushuang\AppData\Local\Programs\Python\Python36-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 378
def //*[@id="ItemForm"]/div[2]/div[4]/div[1]/div[2]/inputfind_element_by_xpath(self, xpath):
^
SyntaxError: invalid syntax
解决方案:
卸载selenium:pip uninstall selenium
重新安装:pip install selenium |
|