调用来自氦的函数 start_chrome() 时出错

问题描述

当我运行此代码时:

from helium import *

start_chrome()

我收到此错误NameError: name 'start_chrome' is not defined 帮助解决这个问题。有趣的是昨天它正在工作。

解决方法

我在VS Code中测试了这段代码,结果显示可以运行:

enter image description here

请在 VS Code 终端检查当前 python 环境是否包含模块“helium”。

enter image description here

另外,请尝试重新加载 VS Code 以使其识别模块。

我的环境:

VS 代码:1.53.2(用户设置);蟒蛇:3.8; python扩展名:2021.2.582707922; Jupyter 扩展:2021.2.576440691

"python.languageServer": "Microsoft",

操作系统:Windows_NT x64 10.0.19041