Isaac Sim Tutorial 3.7: Can't import PhysxScheam from pxr error msg

Hi everybody,

I am currently going though the Required Tutorials for Isaac Sim and I encountered a problem with the example “(3.7). Converting it to a Standalone Application” which doesn’t quite work for me. I ran the original “my_application.py” file in debugging mode and I got sent to “physics_context.py” with the error message:

NOTE! I am working with Isaac Sim as a part of my Bachelor’s degree (Mechanical Engineer) so I am not too experienced with troubleshooting python codes. Me and a fellow data engineering student made an attempt at researching the problem, but we only stumbled upon one post that mentions ‘pxr’ & ‘PhysxSchema’. As far as we know, it was not too related to our problem. So we are kind of confused as to what is causing this error message and even how to ask for help.

Post: Cannot import name PhysxScheam from pxr

Here’s the error message from “physics_context.py”:

Exception has occurred: ImportError
cannot import name 'PhysxSchema' from 'pxr' (unknown location)
  File "/home/roberts/.local/share/ov/pkg/isaac_sim-2021.2.1/exts/omni.isaac.core/omni/isaac/core/physics_context/physics_context.py", line 12, in <module>
    from pxr import Usd, UsdGeom, Gf, Sdf, UsdPhysics, PhysxSchema
  File "/home/roberts/.local/share/ov/pkg/isaac_sim-2021.2.1/exts/omni.isaac.core/omni/isaac/core/physics_context/__init__.py", line 9, in <module>
    from omni.isaac.core.physics_context.physics_context import PhysicsContext
  File "/home/roberts/.local/share/ov/pkg/isaac_sim-2021.2.1/exts/omni.isaac.core/omni/isaac/core/__init__.py", line 9, in <module>
    from omni.isaac.core.physics_context.physics_context import PhysicsContext
  File "/home/roberts/.local/share/ov/pkg/isaac_sim-2021.2.1/extension_examples/user_examples2/my_application.py", line 4, in <module>
    from omni.isaac.core import World

Thanks in advance :)

Hi @RobertsP - and best of luck as you work towards your degree! I am checking with the great developers on the Isaac Sim team and we’ll update here with any suggestions shortly.

ICYMI - we have updated the Omniverse Launcher’s “Learn” tab to make finding tutorials even easier! Alco accessible via any of our documentation pages (go to “Learning & Feedback” on left-side): Omniverse Platform Overview — Omniverse Developer documentation

Cheers,
Edmar

P.S. By the way, GTC Spring 2022 has been announced, is all virtual, and free…to register and receive the latest news: GTC 2022: #1 AI Conference

he / him | LinkedIn | Discord ID: Prof E#2041
Omniverse: “A New Era of Collaboration and Simulation” (video)
Omniverse Create’s latest features show & tell: Twitch livestream.
As seen in VentureBeat | Physics Showcase

Omniverse Resources:
Omniverse | Documentation | Tech Requirements | Videos | Roadmap | Twitter | Discord | Twitch

PLEASE NOTE: If you are reporting a bug/issue, please provide OS, GPU, GPU Driver, the version of the app, and full log file (if applicable). For crashes, please zip and provide a link to your logs → C:\Users\ [YOUR NAME] \ .nvidia-omniverse\logs

1 Like

@RobertsP

Are you using one of the debug launch configurations in the vscode environment?
https://docs.omniverse.nvidia.com/app_isaacsim/app_isaacsim/manual_standalone_python.html#launch-json

And in your script can you make sure that any omniverse/pxr imports occur after the call to start SimulationApp

1 Like

In short yes, we were in the “my_application.py” file and selected the Run & Debug option in vscode. This then led to us being sent to “physics_context.py” with the above mentioned error message.

Also all of the code used was copied from the tutorial section, and nor did we apply any changes to other files. To be honest, if I had to make sure that any omniverse/pxr imports occur after the call to start SimulationApp, I wouldn’t even know where to begin to check if that was the case :/

Current Isaac Sim version: 2021.2.1
Current VSC version: 1.63.2

I solved it by reinstalling Isaac Sim, since the problem appeared in the previous examples too.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.