demergent-labs / kybra

Python CDK for the Internet Computer
MIT License
81 stars 15 forks source link

Installing ic-wasm fails #461

Closed fxgst closed 7 months ago

fxgst commented 8 months ago

When starting a fresh project with kybra, dfx deploy fails at this step because ic-wasm is not being installed:

Building canister testtt_backend

Initial build takes a few minutes. Don't panic. Subsequent builds will be faster.

[1/3] πŸ”¨ Compiling Python... 29.82s
[2/3] 🚧 Building Wasm binary... (❀ hang in there, this will be faster next time) 81.06s
[3/3] πŸš€ Optimizing Wasm binary... (❀ hang in there, this will be faster next time)
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/opt/homebrew/lib/python3.11/site-packages/kybra/__main__.py", line 466, in <module>
    main()
  File "/opt/homebrew/lib/python3.11/site-packages/kybra/timed.py", line 11, in inside
    return_value = func(*args)
                   ^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/kybra/__main__.py", line 87, in main
    optimize_wasm_binary_or_exit(
  File "/opt/homebrew/lib/python3.11/site-packages/kybra/timed.py", line 25, in inside
    return_value = func(*args, verbose=verbose, **kwargs)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/kybra/__main__.py", line 356, in optimize_wasm_binary_or_exit
    optimization_result = subprocess.run(
                          ^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/python@3.11/3.11.7_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/subprocess.py", line 548, in run
    with Popen(*popenargs, **kwargs) as process:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/python@3.11/3.11.7_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/subprocess.py", line 1026, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/opt/homebrew/Cellar/python@3.11/3.11.7_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/subprocess.py", line 1950, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/Users/.../.config/kybra/rust/1.72.0/bin/ic-wasm'
lastmjs commented 8 months ago

This problem should be fixed if you are using version 0.5.3 of Kybra, please let me know if you are using 0.5.3 and are still experiencing the issue.

https://github.com/demergent-labs/kybra/releases/tag/0.5.3