For some reason my code is having trouble opening a simple file:
This is the code:
file1 = open(\'recentlyUpdated.yaml\')
And the erro
Possibly, you closed the 'file1'.
Just use 'w' flag, that create new file:
file1 = open('recentlyUpdated.yaml', 'w')
mode is an optional string that specifies the mode in which the file is opened. It defaults to 'r' which means open for reading in text mode. Other common values are 'w' for writing (truncating the file if it already exists)...
(see also https://docs.python.org/3/library/functions.html?highlight=open#open)