报错:ImportError: cannot import name 'InvalidArgumentException' from 'selenium.common.exceptions' (/usr/local/lib/python3.7/site-packages/selenium/common/exceptions.py)

原因:selenium.common.exceptions.py中未定义InvalidArgumentException类,导致出现该报错。

我是在mac中遇到的,如下提示了我出错误文件的位置,/usr/local/lib/python3.7/site-packages/selenium/common/exceptions.py

在这个文件中最后加上一个类:

class InvalidArgumentException(WebDriverException):
    """
    """
    pass

 

Logo

北京人形旗下天工造物具身智能开源社区,聚焦具身天工与慧思开物两大平台

更多推荐