I am trying to create a text file and write to it but the file is not being created as it states the file is not found.
I am using this line of code which PyCharm as my IDE:
with open(f"journal/{date}.txt","w") as file:
And I am expecting python to create the file but it is not. The folder in which to create the file does exist. I am receiving the error:
FileNotFoundError: [Errno 2] No such file or directory: 'journal/2024-01-25.txt'
I am new to python so any assistance would be greatly appreciated.
Thank you