write pdf file to dataiku folder using python

jalkhonaifer
jalkhonaifer Partner, Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer, Registered Posts: 1 Partner
edited July 16 in General Discussion

I am trying to write a pdf filer to dataiku folder.
usually I can write pdf file in my device with:
with open(outputFile, "wb") as outputStream:
output.write(outputStream)

but it doesnt work withing Dataiku
Also I tried to use this:

with open(os.path.join('Folder Location', "file.pdf")) as outputStream:
output.write(outputStream)

and it gives this error as there is no file that exists there

FileNotFoundError: [Errno 2] No such file or directory: 

Operating system used: windows

Answers

Setup Info
    Tags
      Help me…