Python NameError: Name 'get_tool_versions' not defined -
i trying run cmd script calls setenv.py
file. file has function says,
import build_cfg tool_versions = get_tool_versions() env_var_list = get_env_var()
which believe importing build_cfg
module. build_cfg
in turn has get_tool_versions
, get_env_vars
functions defined.
anyway, when run script error :
file "setenv.py", line 172, in <module> tool_versions = get_tool_versions () nameerror: name 'get_tool_versions' not defined
i relatively new python. please tell me doing wrong?
the error message says all: function get_tool_versions
not exist in global namespace. solve problem have find out get_tool_versions
defined , import there. if defined in build_cfg
can this:
import build_cfg tool_versions = build_cfg.get_tool_versions() ...
or
from build_cfg import get_tool_versions tool_versions = get_tool_versions() ...
Comments
Post a Comment