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

thread 'main' panicked at 'called `Result::unwrap() #68

Open
SachinMaharana opened this issue Jul 15, 2020 · 3 comments
Open

thread 'main' panicked at 'called `Result::unwrap() #68

SachinMaharana opened this issue Jul 15, 2020 · 3 comments

Comments

@SachinMaharana
Copy link

SachinMaharana commented Jul 15, 2020

I am getting this error intermittently, not sure where to debug this.

The code(taken from examples and https://github.com/cholcombe973/ceph_usage/blob/master/src/lib.rs) is here:

https://github.com/SachinMaharana/ceph-op/blob/449ab8ac38dc737919f68ef77e4aa2579bf84581/src/main.rs

cargo run
    Finished dev [unoptimized + debuginfo] target(s) in 0.03s
     Running `target/debug/ceph-op`
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Utf8Error { valid_up_to: 10, error_len: Some(1) }', /home/centos/.cargo/registry/src/github.com-1ecc6299db9ec823/ceph-3.0.0/src/ceph.rs:1988:46
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
@cholcombe973
Copy link
Contributor

It's a bug with this piece of code: https://github.com/ceph/ceph-rust/blob/v3.0.0/src/ceph.rs#L1988. That unwrap should be a checked ? instead. It appears that the string being returned is not valid utf8.

@cholcombe973
Copy link
Contributor

Would you like to try forking the repo, changing those unwraps and seeing if that helps?

@SachinMaharana
Copy link
Author

@cholcombe973 sure. I will get on this.

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

2 participants