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

Too generic error: "No such file or directory" when loading the config file...and a certificate file. #212

Closed
Folaht opened this issue May 26, 2020 · 0 comments · Fixed by #228
Labels
enhancement good first issue An issue that would be good for new contributors!

Comments

@Folaht
Copy link

Folaht commented May 26, 2020

$cargo run

Finished dev [unoptimized + debuginfo] target(s) in 0.13s
Running /home/folaht/testbot/devlohpmaq/target/debug/testbot
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Io(Os { code: 2, kind: NotFound, message: "No such file or directory" })', src/main.rs:10:15
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

$strace target/debug/testbot

openat(AT_FDCWD, "cert.der", O_RDONLY|O_CLOEXEC) = -1 ENOENT (Aucun fichier ou dossier de ce type)

main.rs

...
let cfg = Config::load("/home/folaht/.config/testbot/config.toml").unwrap();
...
$cat /home/folaht/.config/testbot/config.toml
nickname = "Testbottest1234"
server = "irc.freenode.net"
...
cert = cert.der
...

I'm a complete beginner in rust, so for two days I thought the error meant that it couldn't find the config.toml file.
It turns out it was the certification file that it couldn't find.

@Folaht Folaht changed the title I'm unable to load the config file. Too generic error: "No such file or directory" when loading the config file. May 28, 2020
@Folaht Folaht changed the title Too generic error: "No such file or directory" when loading the config file. Too generic error: "No such file or directory" when loading the config file...and a certificate file. May 28, 2020
@aatxe aatxe added enhancement good first issue An issue that would be good for new contributors! labels Jun 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement good first issue An issue that would be good for new contributors!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants