Open adamnietopfizer opened 11 months ago
I could probably make the last line with os.path.join
a little bit more readable. Also made it safer to only check for a path that ends with root_relative_path
paths = os.environ.get(self.dss_python_path_env_var)
if paths:
paths_splitted = paths.split(":")
for path in paths_splitted:
if root_relative_path == path.split("/")[-1]:
return os.path.join(path.rstrip(root_relative_path), self.relative_path)
hello @adamnietopfizer , there is indeed a bug making it not working as it should if the user isolation framework is not setup. thank you for pointing out this, will be updated soon
Hi @anaslaaroussi1,
Why do we look for
project-python-libs
here as the target directory?https://github.com/dataiku/solutions-contrib/blob/8147bd1f91452089f8c789a4c4af8c0f6b3e77d9/bs-infra/webaiku/context/execution.py#L77
For some reason on my DSS instance it cannot find that in the paths listed in the PYTHONPATH environment variable. Is it a given that
project-python-libs
would be present in the PYTHONPATH? The only time I seeproject-python-libs
appear is when runningos.listdir(None)
in the standard web app's python backend. However, in my instance for some reason the Dataiku DSS project's library folder is not actually present in thatproject-python-libs
. It is only accessible through theDSS_DATA_DIR/config/projects/DSS_PROJECT_KEY/lib/webapps
. I believe you may be mentioning that this issue can occur here...https://github.com/dataiku/solutions-contrib/blob/8147bd1f91452089f8c789a4c4af8c0f6b3e77d9/bs-infra/webaiku/context/execution.py#L114-L115
I am getting that exception thrown underneath line 116. Perhaps something like this to autofix will resolve the issue?
I found that the following lines I added below resolve the issue for me: