zoukankan      html  css  js  c++  java
  • Python 报错 SyntaxError: invalid syntax 解决方法

    脚本没有报错,但是有底色标记部分语句,运行后报错信息如下:

    C:UsersliushuangAppDataLocalProgramsPythonPython36-32python.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:UsersliushuangAppDataLocalProgramsPythonPython36-32libsite-packagesseleniumwebdriver\__init__.py", line 18, in <module>
    from .firefox.webdriver import WebDriver as Firefox # noqa
    File "C:UsersliushuangAppDataLocalProgramsPythonPython36-32libsite-packagesseleniumwebdriverfirefoxwebdriver.py", line 29, in <module>
    from selenium.webdriver.remote.webdriver import WebDriver as RemoteWebDriver
    File "C:UsersliushuangAppDataLocalProgramsPythonPython36-32libsite-packagesseleniumwebdriver emotewebdriver.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

  • 相关阅读:
    Redis 常用命令
    docker安装与配置nginx详细过程
    docker安装与配置redis详细过程
    kettle 查询 tinyint 值为 Y,kettle 查询 tinyint 为布尔值
    kettle 乱码问题处理方案
    Vue响应式原理
    ES6学习笔记1
    xlxs转成Unicode编码的json文件
    移动、PC图片拖拽缩放2
    util
  • 原文地址:https://www.cnblogs.com/shimo/p/9951275.html
Copyright © 2011-2022 走看看