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

gymnasium.logger.WARN( TypeError: 'int' object is not callable #845

Closed
1 task done
WillDudley opened this issue Oct 31, 2022 · 0 comments
Closed
1 task done

gymnasium.logger.WARN( TypeError: 'int' object is not callable #845

WillDudley opened this issue Oct 31, 2022 · 0 comments

Comments

@WillDudley
Copy link
Contributor

WillDudley commented Oct 31, 2022

Describe the bug
cooperativepong's render function has the following check:

        if self.render_mode is None:
            gymnasium.logger.WARN(
                "You are calling render method without specifying any render mode."
            )
            return

This doesn't actually hit the message as gymnasium.logger.WARN is an int and thus can't be used.

Code example

from pettingzoo.butterfly import cooperative_pong_v5

env = cooperative_pong_v5.parallel_env()
env.reset()
env.render()

stack trace

Traceback (most recent call last):
  File "/home/will/Repositories/cooppong/main.py", line 7, in <module>
    env.render()
  File "/home/will/Repositories/cooppong/venv/lib/python3.9/site-packages/pettingzoo/utils/conversions.py", line 177, in render
    return self.aec_env.render()
  File "/home/will/Repositories/cooppong/venv/lib/python3.9/site-packages/pettingzoo/utils/wrappers/order_enforcing.py", line 64, in render
    return super().render()
  File "/home/will/Repositories/cooppong/venv/lib/python3.9/site-packages/pettingzoo/utils/wrappers/base.py", line 88, in render
    return self.env.render()
  File "/home/will/Repositories/cooppong/venv/lib/python3.9/site-packages/pettingzoo/utils/wrappers/base.py", line 88, in render
    return self.env.render()
  File "/home/will/Repositories/cooppong/venv/lib/python3.9/site-packages/pettingzoo/butterfly/cooperative_pong/cooperative_pong.py", line 426, in render
    return self.env.render()
  File "/home/will/Repositories/cooppong/venv/lib/python3.9/site-packages/pettingzoo/butterfly/cooperative_pong/cooperative_pong.py", line 266, in render
    gymnasium.logger.WARN(
TypeError: 'int' object is not callable

System Info
Describe the characteristic of your environment:

  • Describe how Gymnasium was installed (pip, docker, source, ...): pip install pettingzoo[butterfly], no other deps
  • Operating system: Ubuntu 20.04
  • Python version: 3.9

Additional context
N/A

Checklist

  • I have checked that there is no similar issue in the repo (required)
WillDudley added a commit that referenced this issue Oct 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant