When I try to reproduce the example in (https://tianshou.readthedocs.io/en/master/tutorials/tictactoe.html), I encounter an type error: TypeError: object of type 'PettingZooEnv' has no len()
The complete error information is as follows:
Traceback (most recent call last):
File "tic_tac_toe.py", line 244, in <module>
watch(args, agent)
File "tic_tac_toe.py", line 236, in watch
collector = Collector(policy, env, exploration_noise=True)
File "/home/lzy/miniconda3/envs/ray/lib/python3.8/site-packages/tianshou/data/collector.py", line 70, in __init__
self.env_num = len(self.env)
TypeError: object of type 'PettingZooEnv' has no len()
Writing "env = DummyVectorEnv([lambda:env])" after "env = get_env()" can fix this error. Maybe the tutorials should be updated?