Answers for "ValueError: I/O operation on closed file."

1

ValueError: I/O operation on closed file.

ValueError: I/O operation on closed file.

The Above error may ossour because,
you are writing to the file When it is closed
** To Solve this error **
  >>> Make sure that your file.write statement is in the 
  >>> 'with open('textFile.txt', 'w') as textFile:'
Posted by: Guest on June-05-2021

Python Answers by Framework

Browse Popular Code Answers by Language