purple-appointment-84502
06/22/2021, 8:52 AMfrom ..common.commonComponentResource
And I'm getting relative import errors.
From my understanding, the work_dir
specified as part of the automation api, needs to be where the stack .yaml files are, and this is then used as the python working directory too.
Is there any way to have a different work directory to get around the relative import errors?
So the project structure I have is:
-- Common
---- CommonComponentResource.py
---- __init.py
-- Stack1
---- _main.py
---- yaml
-- Stack2
Thanks for your help!billowy-army-68599
06/22/2021, 8:56 AMand this is then used as the python working directory tooI don't think this is necessarily true, it's a little hard to follow your directory layout structure, but your python interpreter just reads the files as they are
purple-appointment-84502
06/22/2021, 9:02 AMimport os
cwd = os.getcwd()
What I've noticed is when the automation script runs the tries to run the main stack, the working directory is the stack1 folder. Which is why it's having an issue with the relative imports.
I should mention, I've using the automation API to run a "Local Program"