Is this not how you would correctly set up an observation space? I tested by having an observation be np.array([0, 0, 0]) but it’s still giving me this. Any ideas?
I was able to get this resolved by simply returning an observation in the reset function, as that was causing my error to appear. How you managed to train the environment without doing that is beyond me.
Hi,
Your initial post did not say that the error occurred during training so I just ran your code, created all objects and it did not throw the error that you posted. Apart from that: Yes, the gym API dictates that the reset function must return an initial observation. But the env you posted returns None, right? Not an np.array, but neither a python list.
Cheers