"usdpython 0.64". I've run into a bit of a road block running it on a server.

So I have a Node.js server set up locally that takes a .glb file, converts it and then sends back a link to the .usdz. This works great. You can see it here.

https://github.com/kylewetton/glb-usdz-node

Note that I've tried a few different ways of settings environment variables and so far this seems to be the best method for me, the repo works fine, however the env variables are set a bit differently.

Code Block
# .env file
PYTHONPATH=usdpython/USD/lib/python
CONVERT=usdpython/usdzconvert/usdzconvert

And then I use a shell script to run it

Code Block
shell.exec(
`${process.env.CONVERT} ${stat}/storage/ar-${unifiedFileName}.glb ${stat}/storage/ar-${unifiedFileName}.usdz -metersPerUnit 1`
);

All pretty simple, again works great.

The problem is, regardless of whether it's DigitalOcean, Heroku or a Docker container, the exact same method always gives me the error

Code Block
[91mError: failed to import pxr module. Please add path to USD Python bindings to your PYTHONPATH[0m

These environment variables are exposed in the exact same way as my local version, correctly pointing to the usdpython files.

What could be fundamentally different between my local computer and a server? This is really where the strain of being predominantly a frontend dev comes into play for me. I'm finding it a bit difficult to debug this outside of console.logging the env variables and confirming they're pointing to the right place. usdzconvert is correctly being run, but it returns the error above regardless of the PYTHONPATH variable being set.

Any light on this would be greatly appreciated.



Dear @kylewettonNZ,

I am having a similar problem also in the local environment especially to set up my variable on my .zsh.
How do you set the variable? I tried the solutions in stackoverflow but they didn't work
"usdpython 0.64". I've run into a bit of a road block running it on a server.
 
 
Q