Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug Report] Tianshou tutorials - TypeError: 'int' object is not callable #853

Closed
1 task done
RaffaeleGalliera opened this issue Nov 8, 2022 · 0 comments · Fixed by #854
Closed
1 task done
Labels
bug Something isn't working

Comments

@RaffaeleGalliera
Copy link
Contributor

Describe the bug

I have just started learning PettingZoo and the Tianshou tutorials code is giving me some problems, I think that the render_mode should be specified when the env is initialized, both in 1_basic_api_usage.py and 3_cli_and_logging.py.
1_basic_api_usage.py:

if __name__ == "__main__":
# Step 1: Load the PettingZoo environment
env = rps_v2.env()
# Step 2: Wrap the environment for Tianshou interfacing
env = PettingZooEnv(rps_v2.env())

3_cli_and_logging.py:

Despite the other tutorials the Tianshou one does not report to be a WIP tutorial and running the code without any changes causes:

pettingzoo/classic/rps/rps.py", line 228, in render
   gymnasium.logger.WARN(
TypeError: 'int' object is not callable

Maybe I am missing something, but all the other tutorials warn of possible bugs, while this one doesn't mention any, so I thought to signal the problem.

Code example

python 1_basic_api_usage.py
python 3_cli_and_logging.py

System info

  • Pettingzoo installed via pip
  • Version: '1.22.1'
  • Ubuntu 22.04
  • Python version 3.8.15

Additional context

I will make a PR, in case maintainers would like to consider it for a quick fix.

Checklist

  • I have checked that there is no similar issue in the repo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant