I tried to write in a file using the open()
function with the mode wb
this mode opens a file for writing, creates the file if it does not exist in a binary mode.
When the following code is execute it throws a FileNotFound exception
Any thought what it could be ?
This is the code:
dir = ""
idFile = "001"
with open("{0}tmp/file_{1}".format(dir, idFile), "wb") as file:
file.write("hello")
This is the error i got after executed the code before.