Skip to content

Commit

Permalink
fix unicode issue
Browse files Browse the repository at this point in the history
  • Loading branch information
dguittet committed Dec 5, 2024
1 parent 8274fba commit 1858ebd
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/PySAM_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand All @@ -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);
}

Expand Down

0 comments on commit 1858ebd

Please sign in to comment.