Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: fail to build ping-pong SC #11

Open
getlarge opened this issue Mar 12, 2023 · 3 comments
Open

bug: fail to build ping-pong SC #11

getlarge opened this issue Mar 12, 2023 · 3 comments
Assignees

Comments

@getlarge
Copy link

getlarge commented Mar 12, 2023

On MacOS Ventura - Intel, I fail to build the smart contract when running mxpy build contract.
Any idea what could go wrong?
Being unfamiliar with python, I have no idea what could be wrong with asyncio

The errors logs:


INFO:projects.core:build_project.directory: /Users/edouard/Library/Mobile Documents/com~apple~CloudDocs/Dev/multiverx/ping-pong/contract/ping-pong
INFO:projects.core:build_project.debug: False
INFO:myprocess:run_process: ['rustc', '--version'], in folder: None
INFO:myprocess:Successful run. Output:
rustc 1.70.0-nightly (8a73f50d8 2023-03-11)

INFO:myprocess:run_process_async: ['cargo', 'run', 'build', '--target=wasm32-unknown-unknown', '--release', '--out-dir', '/Users/edouard/Library/Mobile Documents/com~apple~CloudDocs/Dev/multiverx/ping-pong/contract/ping-pong/output', '--target-dir', '/Users/edouard/multiversx-sdk/default_cargo_target', '--no-wasm-opt'], in folder: /Users/edouard/Library/Mobile Documents/com~apple~CloudDocs/Dev/multiverx/ping-pong/contract/ping-pong/meta
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/Users/edouard/multiversx-sdk/mxpy-venv/lib/python3.11/site-packages/multiversx_sdk_cli/cli.py", line 110, in <module>
    ret = main(sys.argv[1:])
          ^^^^^^^^^^^^^^^^^^
  File "/Users/edouard/multiversx-sdk/mxpy-venv/lib/python3.11/site-packages/multiversx_sdk_cli/cli.py", line 29, in main
    _do_main(cli_args)
  File "/Users/edouard/multiversx-sdk/mxpy-venv/lib/python3.11/site-packages/multiversx_sdk_cli/cli.py", line 54, in _do_main
    args.func(args)
  File "/Users/edouard/multiversx-sdk/mxpy-venv/lib/python3.11/site-packages/multiversx_sdk_cli/cli_contracts.py", line 263, in build
    projects.build_project(project, options)
  File "/Users/edouard/multiversx-sdk/mxpy-venv/lib/python3.11/site-packages/multiversx_sdk_cli/projects/core.py", line 41, in build_project
    outputs = project.build(options)
              ^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/edouard/multiversx-sdk/mxpy-venv/lib/python3.11/site-packages/multiversx_sdk_cli/projects/project_base.py", line 31, in build
    self.perform_build()
  File "/Users/edouard/multiversx-sdk/mxpy-venv/lib/python3.11/site-packages/multiversx_sdk_cli/projects/project_rust.py", line 44, in perform_build
    self.run_meta()
  File "/Users/edouard/multiversx-sdk/mxpy-venv/lib/python3.11/site-packages/multiversx_sdk_cli/projects/project_rust.py", line 76, in run_meta
    return_code = myprocess.run_process_async(args, env=env, cwd=str(cwd))
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/edouard/multiversx-sdk/mxpy-venv/lib/python3.11/site-packages/multiversx_sdk_cli/myprocess.py", line 38, in run_process_async
    result = loop.run_until_complete(_async_subprocess(args, env, stdout_sink, stderr_sink, cwd))
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/[email protected]/3.11.2_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/Users/edouard/multiversx-sdk/mxpy-venv/lib/python3.11/site-packages/multiversx_sdk_cli/myprocess.py", line 48, in _async_subprocess
    await asyncio.wait([
  File "/usr/local/Cellar/[email protected]/3.11.2_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/tasks.py", line 415, in wait
    raise TypeError("Passing coroutines is forbidden, use tasks explicitly.")
TypeError: Passing coroutines is forbidden, use tasks explicitly.
sys:1: RuntimeWarning: coroutine '_read_stream' was never awaited

@schimih
Copy link

schimih commented Mar 13, 2023

Hey @getlarge ,
This is a mxpy issue, therefore I will move the issue there -> follow it here: mx-sdk-py-cli.

A fix will be available ETA 15.03.2023 but until then you may use sc-meta. This is the way to go for building SCs, instead of mxpy if you have python > 3.10.

@getlarge
Copy link
Author

Hey @getlarge , This is a mxpy issue, therefore I will move the issue there -> follow it here: mx-sdk-py-cli.

A fix will be available ETA 15.03.2023 but until then you may use sc-meta. This is the way to go for building SCs, instead of mxpy if you have python > 3.10.

At the time of writing this issue, I wasn't sure if that was related to the tutorial setup, but you're right, as creating an empty smart contract and trying to build it led to the same error.
So should this issue be closed ?

Thanks for pointing me to sc-meta, I haven't gone far enough in the docs to see it.

@andreibancioiu
Copy link

Thank you for the report!

Will be fixed by multiversx/mx-sdk-py-cli#241.

@andreibancioiu andreibancioiu self-assigned this Mar 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants