From 75c010a4489fa6664af9c325113e7ba111552e83 Mon Sep 17 00:00:00 2001 From: Jacob Lee Date: Thu, 4 Dec 2025 12:20:20 -0800 Subject: [PATCH] Fix env_init error message - says 5 args but actually needs 6 Function checks for 6 args and uses all 6 (obs, actions, rewards, terminals, truncations, seed) but error message said 5. Fixes #373 --- pufferlib/ocean/env_binding.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pufferlib/ocean/env_binding.h b/pufferlib/ocean/env_binding.h index f64b6148b..3a13f0ad3 100644 --- a/pufferlib/ocean/env_binding.h +++ b/pufferlib/ocean/env_binding.h @@ -49,7 +49,7 @@ static Env* unpack_env(PyObject* args) { // Python function to initialize the environment static PyObject* env_init(PyObject* self, PyObject* args, PyObject* kwargs) { if (PyTuple_Size(args) != 6) { - PyErr_SetString(PyExc_TypeError, "Environment requires 5 arguments"); + PyErr_SetString(PyExc_TypeError, "Environment requires 6 arguments"); return NULL; }