what's happening
see the error "I/O occurred on closed file"? maybe don't close the file before writing to it or reading from it? is there any chance this happens?
Can you remove all the empty space after = in client.put_object? Or at least format it properly using black
Обсуждают сегодня