Closed filipmacek closed 1 month ago
After the recent changes https://github.com/nautechsystems/nautilus_trader/commit/2526448a5d9b2783b78d6468de31a81b7af992ef in order event pyo3 conversion getter attribute was missing as you cannot use .getattr on function type_str. Instead of that we can use __name__ or __class__ attribute, and remove all type_str function from pyo3 classes
getter
.getattr
type_str
__name__
__class__
pyo3_runtime.PanicException: called `Result::unwrap()` on an `Err` value: PyErr { type: <class 'TypeError'>, value: TypeError("'builtin_function_or_method' object cannot be converted to 'PyString'"), traceback: None }
Pull Request
After the recent changes https://github.com/nautechsystems/nautilus_trader/commit/2526448a5d9b2783b78d6468de31a81b7af992ef in order event pyo3 conversion
getter
attribute was missing as you cannot use.getattr
on functiontype_str
. Instead of that we can use__name__
or__class__
attribute, and remove alltype_str
function from pyo3 classes