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

[Question] ModuleNotFoundError: No module named 'omni.client' #257

Open
nowionlyseedaylight opened this issue Feb 27, 2024 · 5 comments
Open
Labels
question Further information is requested

Comments

@nowionlyseedaylight
Copy link

nowionlyseedaylight commented Feb 27, 2024

Question

I was running the code from orbit_tasks. However, I keep getting the error message that the module 'omni.client' cannot be imported. How can I solve this problem? I thought that I installed all packages provided by orbit.

vision@vision-Z690-AORUS-PRO-DDR4:~/orbit$ ./orbit.sh -p source/extensions/omni.isaac.orbit_tasks/omni/isaac/orbit_tasks/manipulation/reach/reach_env_cfg.py

[INFO] Using python from: /home/vision/.local/share/ov/pkg/isaac_sim-2023.1.0-hotfix.1/python.sh
Traceback (most recent call last):
File "/home/vision/orbit/source/extensions/omni.isaac.orbit_tasks/omni/isaac/orbit_tasks/manipulation/reach/reach_env_cfg.py", line 10, in
import omni.isaac.orbit.sim as sim_utils
File "/home/vision/orbit/source/extensions/omni.isaac.orbit/omni/isaac/orbit/sim/init.py", line 29, in
from .converters import * # noqa: F401, F403
File "/home/vision/orbit/source/extensions/omni.isaac.orbit/omni/isaac/orbit/sim/converters/init.py", line 20, in
from .asset_converter_base import AssetConverterBase
File "/home/vision/orbit/source/extensions/omni.isaac.orbit/omni/isaac/orbit/sim/converters/asset_converter_base.py", line 17, in
from omni.isaac.orbit.utils.assets import check_file_path
File "/home/vision/orbit/source/extensions/omni.isaac.orbit/omni/isaac/orbit/utils/assets.py", line 23, in
import omni.client
ModuleNotFoundError: No module named 'omni.client'
There was an error running python

@nowionlyseedaylight nowionlyseedaylight changed the title [Question] [Question] ModuleNotFoundError: No module named 'omni.client' Feb 27, 2024
@Mayankm96
Copy link
Contributor

The files in Python modules are not directly runnable since they depend on Omniverse to be running first. This is because Omniverse extensions are hot-reloaded when the application is launched. They aren't available directly as Python modules.

There are ideas on how to make this possible but right now they are in the works (which may or may not become a thing). To verify your configs, you will first need to launch the simulation application.

Please check here for more info: https://isaac-orbit.github.io/orbit/source/setup/developer.html#standalone-applications

@Mayankm96 Mayankm96 added the question Further information is requested label Feb 29, 2024
@nowionlyseedaylight
Copy link
Author

nowionlyseedaylight commented Mar 5, 2024

@Mayankm96 Thanks for your response.
However, I'm pretty sure it's runnable in python modules (through ./orbit.sh -p ....), since it worked with the last version of orbit.
My colleague made the additional folder in the orbit/source/extensions/omni.isaac.orbit_tasks/omni/isaac/orbit_tasks/manipulation to implement the customized code. And it was possible to run the code file via local terminal.

But now, with this new version (or I'm not sure whether it's the problem of my situation) I continually get the error message like above. Is there any possibility for the reason of that error to be the orbit installation process? (for example, the module like omni.client may have been omitted)

If not, could it be implemented through standalone applications?

@pengxiangzang
Copy link

I'm also confused about this problem. How did you solve it? Could you please give me some advice?

@Mayankm96
Copy link
Contributor

Mayankm96 commented Sep 16, 2024

Are you able to run the demos mentioned here?

https://isaac-sim.github.io/IsaacLab/source/setup/sample.html#showroom

As mentioned in the docs, you can't execute module-level code since it expects hot-reloading of Omniverse extensions. This only happens after you launch the simulation app.

To execute a standalone script, it should do the following:

"""Launch Isaac Sim Simulator first."""

import argparse

from omni.isaac.lab.app import AppLauncher

# add argparse arguments
parser = argparse.ArgumentParser(description="My dummy script.")
# append AppLauncher cli args
AppLauncher.add_app_launcher_args(parser)
# parse the arguments
args_cli = parser.parse_args()

# launch omniverse app
app_launcher = AppLauncher(args_cli)
simulation_app = app_launcher.app

"""Rest everything follows."""

# INSERT YOUR PYTHON CODE

@pengxiangzang
Copy link

I can run the demos in standalone , but when it comes to franka.py in omni.isaac.orbit_assets of extensions, this problem comes up. So the problem is that I didn't understand the structure of the codes.Thank you for your reply and sorry to take up your time.I'm just starting to learn how to use the isaac lab. Did you follow some video tutorials? The official documentation really confuses me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants