We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
extern crate pyo3; use pyo3::{Python, ObjectProtocol}; fn main() { let gil = Python::acquire_gil(); let py = gil.python(); let a = py.eval("42", None, None).unwrap(); a.call_method0("__str__").unwrap(); // ok a.call_method0("nonexistent_method").unwrap(); // crashes }
Ideally should produce AttributeError or something.
AttributeError
This happens because in
pyo3/src/objectprotocol.rs
Lines 329 to 340 in 30baa99
ptr
NULL
The text was updated successfully, but these errors were encountered:
we should return PyErr if ptr is null,
https://github.com/PyO3/pyo3/blob/master/src/err.rs#L239
Sorry, something went wrong.
call_method*() crashes when the method does not exist #113
0b9557a
fixed in master
No branches or pull requests
Ideally should produce
AttributeError
or something.This happens because in
pyo3/src/objectprotocol.rs
Lines 329 to 340 in 30baa99
ptr
could beNULL
.The text was updated successfully, but these errors were encountered: