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 contracts on Python > 3.10 #238

Closed
schimih opened this issue Mar 13, 2023 · 1 comment · Fixed by #241
Closed

bug: fail to build contracts on Python > 3.10 #238

schimih opened this issue Mar 13, 2023 · 1 comment · Fixed by #241
Assignees

Comments

@schimih
Copy link
Contributor

schimih commented Mar 13, 2023

From multiversx/mx-ping-pong-sc#11:

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/comappleCloudDocs/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/comappleCloudDocs/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/comappleCloudDocs/Dev/multiverx/ping-pong/contract/ping-pong/meta
Traceback (most recent call last):
File "", line 198, in _run_module_as_main
File "", 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
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

@andreibancioiu andreibancioiu changed the title bug: fail to build ping-pong SC bug: fail to build contracts on Python > 3.10 Mar 13, 2023
@andreibancioiu
Copy link
Contributor

Thank you for the report!

Will be fixed by #241.

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

Successfully merging a pull request may close this issue.

2 participants