cudaImportExternalMemory failed on rgbImage

I am facing a weird error. Whenever I call gym.create_camera_sensor(env, camera_props), I get an error: [Error] [carb.gym.plugin] cudaImportExternalMemory failed on rgbImage buffer with error 999.

I am trying to get the RGB images from unitree a1 environment in this repo: (GitHub - leggedrobotics/legged_gym: Isaac Gym Environments for Legged Robots).

Even if I try to run the interop_torch.py example then also the same error comes up.