Can't upload files to Managed Folder
I am making a Web-app to load files into a managed folder, but I am getting error. I broadly followed the Dataiku's own tutorial here which works.
I have a managed folder 'Upload' which exists in Flow and I am trying to load file into this folder.
Here is my code:
from dash import Dash, dcc, html, dash_table, Input, Output, State
import dataiku
import base64
import io
app.layout = html.Div(
[
dcc.Upload(
id="upload-data",
children=html.Div(
["Drag and Drop or ", html.A("Select Files")]
),
style={
"width": "100%",
"height": "60px",
"lineHeight": "60px",
"borderWidth": "1px",
"borderStyle": "dashed",
"borderRadius": "5px",
"textAlign": "center",
"margin": "10px",
},
multiple=True, # Allow multiple files
),
html.Div(id="output-upload-status"),
]
)
@app.callback(
Output("output-upload-status", "children"),
Input("upload-data", "filename"),
Input("upload-data", "contents"),
prevent_initial_call=True
)
def upload_to_managed_folder(list_of_names, list_of_contents):
if list_of_contents is not None:
for c, name in zip(list_of_contents, list_of_names):
mf = dataiku.Folder('Upload') # The MANAGED FOLDER I am loading into.
print(mf)
for name, data in zip(list_of_names, list_of_contents):
content_type, content_string = data.split(',')
stream_d = base64.b64decode(content_string)
stream = io.BytesIO(stream_d)
mf.upload_stream(name, stream)
return f"Successfully uploaded: {', '.join(list_of_names)}"
return ""
Here is the error I am getting:
2026-08-27 17:02:48,310 ERROR Exception on /_dash-update-component [POST]Traceback (most recent call last):
….
…
File "/home/dpag/appdata/dataiku/dataiku-dss-13.2.2/python/dataiku/core/intercom.py", line 675, in _handle_void_resp
raise Exception("%s: %s" % (err_msg, _get_error_message(err_data).encode("utf8")))
Exception: None: b'Managed folder name not found: Upload in Anr_Tool'
2026-08-27 17:02:48,315 INFO 127.0.0.1 - - [27/Aug/2026 17:02:48] "[35m[1mPOST /_dash-update-component HTTP/1.1[0m" 500 -
Error says that there is no such managed folder 'Upload' in the flow, which clearly there is.
Can anyone suggest where I am making a mistake?
Thanks!
Dataiku version used: 13.2.2
Answers
-
Turribeach Dataiku DSS Core Designer, Neuron, Dataiku DSS Adv Designer, Registered, Neuron 2023, Circle Member Posts: 2,721 NeuronIs your webapp in the same project as the managed folder Upload? If the code example works then issue is your new code. Try passing the Folder ID instead, you can see the Folder ID if you navigate to the folder from the flow and look at the browser URL.
-
Many thanks for your response. I hadn't noticed that my Web-app was not in the same project. Sorry for this silly mistake. I am quite new to DataIKU. I changed to the project where the requisite folder was and it works like a charm.
Many thanks for your help 🙂
-
Turribeach Dataiku DSS Core Designer, Neuron, Dataiku DSS Adv Designer, Registered, Neuron 2023, Circle Member Posts: 2,721 NeuronGlad I could help. You can pass an additional parameter to the API call if you want to use a folder in different project (project_key=) or can use the dataikuapi API package which will require you to get a project handle first before being able to get a handle to the folder:
