I downloaded the github repository iotaledger/iota.rs to my PC and run

cargo run --example address

according to the instructions on the IOTA Client Library website and the following error occured :


The error refers to this line of code:

   let seed = Seed::from_bytes(&hex::decode(env::var("NONSECURE_USE_OF_DEVELOPMENT_SEED_1").unwrap()).unwrap());

I also tried to manipulate the code a little bit to resolve the error with replacing


with the actual seed value defined in .env.example


which successfully compiled, but when I run the .exe the same error occurs:

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: NotPresent', examples\address.rs:26:94
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

I am new to Rust (started few days ago because of IOTA) so maybe there is a lack of basic Rust understanding. What also confuses me a little bit is the .env.example file. How is the .env.example file linked to the adress.rs file?

Can someone please help me to resolve the error?

  • 1
    does it help when you rename the .env.example file to .env. Some Rust programs read an .env file at startup to populate environment variables...
    – mihi
    Mar 8 at 20:09
  • It worked, Thank you! Mar 8 at 20:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.