You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
EDIT: Now I went through the PyO3 github repo more and I found PR #1169 which does solve this issue for me. Sorry for issue noise, I'll leave it to you if you want to close this now or after it gets eventually merged. Thanks for all of your work!
I noticed this only when calling __mul__ from within __rmul__, the docstring for the __rmul__ methods was not set explicitly by me but instead it was what seems like random gibberish from the binary itself, the beginning might be some specific error message but quite possibly the whole stuff is just garbage memory.
My setup:
Linux 5.8.12_1 x86_64 (Void Linux)
Python 3.8.5
maturin in virtualenv with everything default
rustc 1.48.0-nightly (7f7a1cbfd 2020-09-27)
PyO3 version 0.12.1 in my project and tested with git master in the minimal example.
For this example on my machine the pyo3_bug.TestClass.__rmul__.__docstring__ string contained 'panic from Rust codepyo3_bug', in my own project (https://github.com/ametisf/sany-py) the .__rmul__.__docstring__ on two different classes looks like
'a Display implementation returned an error unexpectedly/home/adam/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/string.rsalready mutably borrowedassertion failed: step != 0/home/adam/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/adapters/mod.rscalled `Option::unwrap()` on a `None` valuecalled `Result::unwrap()` on an `Err` valueCannot restore a PyErr while normalizing it/home/adam/.cargo/registry/src/git.luolix.top-1ecc6299db9ec823/pyo3-0.12.1/src/err/mod.rs/home/adam/.cargo/registry/src/git.luolix.top-1ecc6299db9ec823/pyo3-0.12.1/src/gil.rs/home/adam/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/str/pattern.rs/home/adam/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter.rssrc/buffer.rsBuffer index out of rangeinternal error: entered unreachable codesrc/ui/spectrogram.rssrc/ui.rssrc/wav/mod.rsHuman readable tag for the buffer.'
and
'a Display implementation returned an error unexpectedly/home/adam/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/string.rsalready mutably borrowed`,\n right: ``called `Option::unwrap()` on a `None` valuecalled `Result::unwrap()` on an `Err` valueCannot restore a PyErr while normalizing it/home/adam/.cargo/registry/src/git.luolix.top-1ecc6299db9ec823/pyo3-0.12.1/src/err/mod.rs/home/adam/.cargo/registry/src/git.luolix.top-1ecc6299db9ec823/pyo3-0.12.1/src/gil.rspanic from Rust code/home/adam/.cargo/registry/src/git.luolix.top-1ecc6299db9ec823/pyo3-0.12.1/src/pycell.rsBufferWaveTableCacheassertion failed: `(left == right)`\n left: `Sampling rate must be grater than 0src/wav/mod.rsRIFF file type is not "WAVE"Only uncompressed PCM format (1) is supported, file specifies Only bit-dephts of 8, 16 and 24 are supported, file specifies WAVE file is missing "fmt " chunkMalformed "fmt " chunk (expected bytes)WAVE file is missing "data" chunkBit-depths don\'t match fmt=__new__'
@kngwyu anything I can do to help with getting #1169 merged? I think it would be nice to make a 0.12.2 release with a fix for this in it before we start merging the breaking changes for 0.13.
EDIT: Now I went through the PyO3 github repo more and I found PR #1169 which does solve this issue for me. Sorry for issue noise, I'll leave it to you if you want to close this now or after it gets eventually merged. Thanks for all of your work!
I noticed this only when calling
__mul__
from within__rmul__
, the docstring for the__rmul__
methods was not set explicitly by me but instead it was what seems like random gibberish from the binary itself, the beginning might be some specific error message but quite possibly the whole stuff is just garbage memory.My setup:
Linux 5.8.12_1 x86_64 (Void Linux)
Python 3.8.5
maturin in virtualenv with everything default
rustc 1.48.0-nightly (7f7a1cbfd 2020-09-27)
PyO3 version 0.12.1 in my project and tested with git master in the minimal example.
For this example on my machine the
pyo3_bug.TestClass.__rmul__.__docstring__
string contained'panic from Rust codepyo3_bug'
, in my own project (https://github.com/ametisf/sany-py) the.__rmul__.__docstring__
on two different classes looks likeand
Minimal example:
Cargo.toml
src/lib.rs
The text was updated successfully, but these errors were encountered: