Python IOError: File not open for reading
You opened the file for writing by specifying the mode as ‘w’; open the file for reading instead: ‘r’ is the default, so it can be omitted. If you need to both read and write, use the + mode: w+ opens the file for writing (truncates it to 0 bytes) but also lets you read from it. If you use r+ it … Read more