Hi,
this is related to How can I write a file to nucleus?
I am trying to write to Nucleus using omni.client.write_file() (seehttps://docs.omniverse.nvidia.com/kit/docs/client_library/latest/docs/python.html). I want to do this from within the Omniverse Kit Docker container. I have only enabled one extension: omni.client.
This is the code:
from omni.client import write_file
from pxr import Usd, UsdGeom
import os
stage = Usd.Stage.CreateNew("/tmp/nucleus_test.usda")
xformPrim = UsdGeom.Xform.Define(stage, "/hello")
spherePrim = UsdGeom.Sphere.Define(stage, "/hello/world")
stage.Save()
with open("/tmp/nucleus_test.usda", "rb") as in_file:
buffer = in_file.read()
write_file("omniverse://nucleus.dsdlab.db.de:443/Users/brunovetter/kit_test/nucleus_test.usda", buffer)
This is what happens:
The container complains that xdg-open is not available (does write_file really use xdg-open??). So I install it into the container. Now I get this message:
/usr/bin/xdg-open: 851: /usr/bin/xdg-open: www-browser: not found
/usr/bin/xdg-open: 851: /usr/bin/xdg-open: links2: not found
/usr/bin/xdg-open: 851: /usr/bin/xdg-open: elinks: not found
/usr/bin/xdg-open: 851: /usr/bin/xdg-open: links: not found
/usr/bin/xdg-open: 851: /usr/bin/xdg-open: lynx: not found
/usr/bin/xdg-open: 851: /usr/bin/xdg-open: w3m: not found
xdg-open: no method available for opening 'https://nucleus.dsdlab.db.de:443/omni/auth/login/?server=nucleus.dsdlab.db.de&nonce=e367590e9204432592bc7b02d252d5c565bd1cd494ad471d8426a3004095fa16'
Also, how can I set the Nucleus credentials when using write_file?
Thanks a lot
Bruno