Hello, I want to do something very simpple. I would like to create directories within my output or input folders that currently do not exist. Normally this would easily be achievable through the python command os.mkdir. Here is my code:
import dataiku import pandas as pd, numpy as np from dataiku import pandasutils as pdu import os # Read recipe inputs test = dataiku.Folder("SZxomfdY") test_info = test.get_info() # Write recipe outputs outputfolder = dataiku.Folder("DBryoOH2") outputfolder_info = outputfolder.get_info() #for file in test.list_paths_in_partition(): #print(file) outputdir = outputfolder_info['accessInfo']['root'] newoutput = os.path.join(outputdir,'newdir') print(newoutput) os.mkdir(newoutput)
however I get the error
FileNotFoundError Traceback (most recent call last) <ipython-input-29-3b604d987ec9> in <module>() 19 newoutput = os.path.join(outputdir,'newdir') 20 print(newoutput) ---> 21 os.mkdir(newoutput)
I don't understand though, it can't locate the folder however it shouldn't be locating the folder, it should be making the folder. Does anyone have any idea what's going on?
The FileNotFoundError also happens when you want to create a new folder within a folder that doesn't exist in the first place. However, your python code should work (I did test it just in case, and it was successful).
Could you share the output from
If that doesn't give some idea of what might be happening, the next steps would be to check what kind of managed folder are you using. Is it a local filesystem managed folder?