Offline_generation.py example fails

This is an issue on Windows still trying to load the old viewport API (will be fixed in version 2022.2.1). Here are some workarounds/solutions for this:

Edit site/sitecustomize.py and remove these two lines:

if os.path.exists(f"{p}/kit/extscore/omni.kit.window.viewport"):
   sys.path.append(f"{p}/kit/extscore/omni.kit.window.viewport")

or

in the python script after SimulationApp starts add:

from omni.isaac.core.utils.extensions import enable_extension
enable_extension("omni.kit.window.viewport")

Related: