Most of the times this part of the code works. But only some times it fails with the error message shown. I am wondering if this is a code problem?
crfile=strftime("%Y-%m-%d %H_%M_%S")
file = open("c:\\all-files\\%s.log" % crfile,"w")
IOError: [Errno 22] invalid mode ('w') or filename: 'c:\\all-files\\2015-03-30 19_05_09.log'