From 1858ebd8beff07ab01fc4a9ff8705416f40c5b14 Mon Sep 17 00:00:00 2001 From: dguittet Date: Thu, 5 Dec 2024 13:52:23 -0700 Subject: [PATCH] fix unicode issue --- src/PySAM_utils.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/PySAM_utils.h b/src/PySAM_utils.h index 4c2e51c..57f14c5 100644 --- a/src/PySAM_utils.h +++ b/src/PySAM_utils.h @@ -1143,9 +1143,7 @@ static PyObject* PySAM_run_getset(PyObject *self, PyObject *arg, PyObject * x_at getset++; } } - char str[256]; - PySAM_concat_msg(str, "'value' error, could not find attribute: ", name); - PyErr_SetString(PyExc_AttributeError, str); + PyErr_SetString(PyExc_AttributeError, "\"value\" error, could not find attribute by that name"); return NULL; } @@ -1165,7 +1163,7 @@ static PyObject * Cmod_value(CmodObject *self, PyObject *args) PyObject* value = NULL; if (!PyArg_ParseTuple(args, "s|O", &name, &value)) return NULL; - + return PySAM_run_getset((PyObject *)self, value, self->x_attr, name, NULL); }