Veryfiying variables set with HAPI_SetServerEnvString fails

   346   2   1
User Avatar
Member
17 posts
Joined: March 2019
Offline
Hi guys,

We are setting plenty of variables to the out to the thrift named pipe session using
HAPI_SetServerEnvString
. Then in the HDA I have a simple python code to dump me the environment variables to trace/file when it starts cooking using
os.environ
and I do not see my variables set there

If I use a json package inside the user dir, I see them there. (This setup is not working for us due to multibranch/multiproject situation).

What am I doing wrong?

Cheers
Tom
User Avatar
Staff
515 posts
Joined: Sept. 2016
Offline
from the python docs on os.environ:
This mapping is captured the first time the os module is imported, typically during Python startup as part of processing site.py. Changes to the environment made after this time are not reflected in os.environ, except for changes made by modifying os.environ directly.
User Avatar
Member
17 posts
Joined: March 2019
Offline
Oh! I am setting all the variables right after the session is created before I am adding or cooking anything so I did not think this could be an issue. Can you recommend then how to verify all necessary variables are set please?

Cheers
Tom
  • Quick Links