kcoley / gltf2usd

command-line utility for converting glTF 2.0 models to USD
MIT License
263 stars 39 forks source link

A horrible death of python #152

Closed Lonerobot closed 5 years ago

Lonerobot commented 5 years ago

Sorry if this is a bit on the basic side. I've pulled the repo, ran requirements.txt and pointed my pythonpath to the macos build of USDPython.

Python path is added to .bash_profile

export PYTHONDONTWRITEBYTECODE=1
export PYTHONPATH="/usr/local/lib/python2.7/site-packages:$PYTHONPATH"
export PATH=$PATH:/Users/Shared/USDPython/USD
export PYTHONPATH=$PYTHONPATH:/Users/Shared/USDPython/USD

running python gltf2usd.py -h

gives me

Python crashed. FATAL ERROR: Failed axiom: ' Py_IsInitialized() '
in operator() at line 148 of /tmp/USD/pxr/base/lib/tf/pyTracing.cpp

The stack can be found in mbp.local:/var/folders/mv/wvt4tbm97wj2b852h2nnx4pmlglg8l/T//st_Python.55235
done.
------------------------------------------------------------------

I guess this is to do with my python environment or install but can anyone shed light on what my issue could be? i've not managed to actually kill python before...

I've attached the stack trace below

gltf2usd crash dump.txt

MacOS Mojave version 10.14.2 (MacPro)

DavidArayan commented 5 years ago

Hello,

I was having this exact issue and unfortunately never found a solution. It's got something to do with python installation problems especially when multiple python versions are installed on the same system. Need to remember that mac also comes with a system version of python installed (it's an older version).

If it helps, I bit the bullet and just used a Docker instance to run the code, which also helped with Clutter management etc.. To do a shameless plug, if you'd like to explore the Docker idea, I've got a sample to get started at https://github.com/Plattar/python-xrutils.

Hope that helps.

Lonerobot commented 5 years ago

Hi David, 

Thanks for the reply. I definitely installed another version of python as part of the prerequisites on building pixar's USD source. So you are right, it must be that if you had the same issue. I thought sonething wasn't quite right about my mac since the build. I will certainly try your docker code, this was next on my to learn list. Thanks for your help. 

Pete