1

我正在尝试从本教程https://docs.elrond.com/developers/tutorials/your-first-dapp/运行合同测试,但是在运行时我偶然发现了以下错误erdpy contract test

INFO:projects.core:run_tests.project: /home/mccuna/repos/elrond/adder/adder
INFO:myprocess:run_process: ['/home/mccuna/elrondsdk/vmtools/mandos-test', '/home/mccuna/repos/elrond/adder/adder/mandos'], in folder: None
Traceback (most recent call last):
  File "/home/mccuna/elrondsdk/erdpy-venv/bin/erdpy", line 8, in <module>
    sys.exit(main())
  File "/home/mccuna/elrondsdk/erdpy-venv/lib/python3.8/site-packages/erdpy/cli.py", line 32, in main
    _do_main()
  File "/home/mccuna/elrondsdk/erdpy-venv/lib/python3.8/site-packages/erdpy/cli.py", line 58, in _do_main
    args.func(args)
  File "/home/mccuna/elrondsdk/erdpy-venv/lib/python3.8/site-packages/erdpy/cli_contracts.py", line 171, in run_tests
    projects.run_tests(args)
  File "/home/mccuna/elrondsdk/erdpy-venv/lib/python3.8/site-packages/erdpy/projects/core.py", line 65, in run_tests
    project.run_tests(directory, wildcard)
  File "/home/mccuna/elrondsdk/erdpy-venv/lib/python3.8/site-packages/erdpy/projects/project_base.py", line 106, in run_tests
    myprocess.run_process(args, env=tool_env)
  File "/home/mccuna/elrondsdk/erdpy-venv/lib/python3.8/site-packages/erdpy/myprocess.py", line 19, in run_process
    output = subprocess.check_output(args, shell=False, universal_newlines=True, stderr=subprocess.STDOUT, env=env, cwd=cwd)
  File "/usr/lib/python3.8/subprocess.py", line 415, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/usr/lib/python3.8/subprocess.py", line 493, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/usr/lib/python3.8/subprocess.py", line 858, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.8/subprocess.py", line 1704, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/home/mccuna/elrondsdk/vmtools/mandos-test'

我已经搜索了一种安装方法mandos-test,但找不到任何有用的东西。我错过了什么?

4

1 回答 1

1

TLDR:如果在 WSL 环境中运行,这可能是问题所在。

好的,我已经设法解决了这个问题。

最初,我使用 WSL2 运行 Windows 10 和 Ubuntu 20.04。在尝试了各种解决方案(例如:更新、重新安装依赖项等)之后,我放弃了。我已经删除了 Ubuntu 20.04 WSL2 环境,而是安装了实际的 Ubuntu 20.04,以及 Windows 10 和它们之间的双启动。一切都在新的独立 Ubuntu 环境中顺利运行。我的猜测是在 WSL2 环境中未安装或未正确配置某些依赖项,但考虑到我当前的 erdpy 和 elrond 技术堆栈经验,我无法确认或查明确切的根本原因。

于 2021-11-12T22:01:46.637 回答