diff --git a/examples/pybullet/gym/pybullet_utils/bullet_client.py b/examples/pybullet/gym/pybullet_utils/bullet_client.py index a477f5c4d..0eb09f8a2 100644 --- a/examples/pybullet/gym/pybullet_utils/bullet_client.py +++ b/examples/pybullet/gym/pybullet_utils/bullet_client.py @@ -41,7 +41,8 @@ class BulletClient(object): def __getattr__(self, name): """Inject the client id into Bullet functions.""" attribute = getattr(pybullet, name) - attribute = functools.partial(attribute, physicsClientId=self._client) + if inspect.isbuiltin(attribute): + attribute = functools.partial(attribute, physicsClientId=self._client) if name=="disconnect": self._client = -1 return attribute