title: OSError unable to create file - invalid argument
body: <p>I am using Python and Keras on top of Tensorflow to train my neural networks.
  When I switched from Ubuntu 16.04 to Windows 10, my model could not be saved anymore when I run the following:</p>
  
  <pre><code>filepath = "checkpoint-"+str(f)+model_type+"-"+optimizer_name+"-{epoch:02d}-{loss:.3f}.hdf5"
  checkpoint = ModelCheckpoint(filepath, monitor='loss', verbose=1, save_best_only=True, mode='min')
  callbacks_list = [checkpoint]
  </code></pre>
  
  <p>and later on:</p>
  
  <pre><code>model.fit(X, y,
        batch_size=128,
        epochs=1,
        shuffle=False,
        callbacks=callbacks_list)
  </code></pre>
  
  <p>I get this Error:</p>
  
  <blockquote>
    <p>OSError: Unable to create file (Unable to open file: name = 'checkpoint-&lt;_io.textiowrapper name='data/swing-projects100-raw/many-chunks/log-gamma-f3.txt' mode='a' encoding='cp1252'>2l128-adam-0.001-{epoch:02d}-{loss:.3f}.h5', errno = 22, error message = 'invalid argument', flags = 13, o_flags = 302)</p>
  </blockquote>
  
  <p>I have Keras 2.0.8 and h5py 2.7.0 installed via conda.</p>
  
  <p>I tried</p>
  
  <pre><code>filepath = "checkpoint-"+str(f)+model_type+"-"+optimizer_name+"-{epoch:02d}-{loss:.3f}.hdf5"
  
  with open(filepath, "w") as f:
    f.write("Test.")
  </code></pre>
  
  <p>and got a similar error:</p>
  
  <blockquote>
    <p>OSError: [Errno 22] Invalid argument: "checkpoint-&lt;_io.TextIOWrapper name='data/swing-projects100-raw/many-chunks/log-gamma-f3.txt' mode='a' encoding='cp1252'>2L128-Adam-0.001-{epoch:02d}-{loss:.3f}.hdf5"</p>
  </blockquote>