Config does not create intermediate directories
aaraney opened this issue · comments
@dtarb found an issue while testing the software deployed on CUAHSI's JupyterHub instance. In short HS resources were not downloading. Upon inspection of the logs, during JupyterLab's plug-in registry phase, hydroshare_on_jupyter
was failing to load because it could not create an intermediate directory for logging.
# in ConfigFile class
if path.is_file():
raise FileNotDirectoryError(
f"Configuration path: {str(path)} is a file not a directory."
)
elif not path.exists():
path.mkdir()
return path
Due to the crash, the ConfigFile
's data_path
property was not set. Therefore, when @dtarb tried to download a resource using the software, the software had no idea where to store it.