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

idf-env idf install fails on a pristine environment #32

Open
ivmarkov opened this issue Nov 1, 2021 · 1 comment
Open

idf-env idf install fails on a pristine environment #32

ivmarkov opened this issue Nov 1, 2021 · 1 comment

Comments

@ivmarkov
Copy link

ivmarkov commented Nov 1, 2021

  • Make sure you don't have an ~/.espressif folder
  • Install idf-env with cargo install idf-env --git https://github.com/espressif/idf-env
  • do export RUST_BACKTRACE=1
  • Issue idf-env idf install
    It panics with output:
ESP-IDF Path: /Users/imarkov/esp/esp-idf-master/
Configuration file not found, creating new one: /Users/imarkov/.espressif/esp_idf.json
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }', src/config.rs:61:54
stack backtrace:
   0: _rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::result::unwrap_failed
   3: idf_env::config::load_json
   4: idf_env::config::update_property
   5: idf_env::idf::get_install_runner
   6: idf_env::idf::get_install_cmd::{{closure}}
   7: <clap_nested::Command<T> as clap_nested::CommandLike<T>>::run
   8: <clap_nested::MultiCommand<S,T> as clap_nested::CommandLike<S>>::run
   9: clap_nested::Commander<(),T>::run
  10: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
  11: tokio::park::thread::CachedParkThread::block_on
  12: tokio::runtime::Runtime::block_on
  13: idf_env::main

Looking at src/config.rs line 61, it seems you are missing a fs::create_dir_all call that should create the ~/.espressif folder first, if it does not exist already.

By the way, all these operations would've been easier if you were using Path / PathBuf based operations, rather than plain string concats. You are lucky that those forward slashes actually do work on Windows. :)

@ivmarkov
Copy link
Author

ivmarkov commented Nov 1, 2021

I must say, manually creating the ~/.espressif did not get me much further.
Now when I do idf-env idf install it says Creating virtual environment: /Users/imarkov/.espressif/python_env/idf4.4_py3.8_env

... and then shows a command prompt as if it did everything already. However, when I look in ~/.espressif, I don't see anything.

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

1 participant