thread 'main' panicked at 'called `Result::unwrap()
SachinMaharana opened this issue · 3 comments
SachinMaharana commented
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 commented
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 commented
Would you like to try forking the repo, changing those unwraps and seeing if that helps?
SachinMaharana commented
@cholcombe973 sure. I will get on this.