title: tensorflow: Something wrong in " tf.gfile.GFile" with "'utf-8' codec can't decode..."
body: <p>when I run my code ,I get the error like this :</p>
  
  <pre><code>File "data2record.py", line 120, in &lt;module&gt;
      run()
    File "data2record.py", line 114, in run
      image_data, shape, bbox, label ,imname= _processing_image(wordbb, imname,coder)
    File "data2record.py", line 64, in _processing_image
      image_data = tf.gfile.GFile(FLAGS.datasets + imname, 'r').read()
    File "/home/tian/.local/lib/python3.5/site-packages/tensorflow/python/lib/io/file_io.py", line 125, in read
      pywrap_tensorflow.ReadFromStream(self._read_buf, length, status))
    File "/home/tian/.local/lib/python3.5/site-packages/tensorflow/python/lib/io/file_io.py", line 93, in _prepare_value
      return compat.as_str_any(val)
    File "/home/tian/.local/lib/python3.5/site-packages/tensorflow/python/util/compat.py", line 106, in as_str_any
      return as_str(value)
    File "/home/tian/.local/lib/python3.5/site-packages/tensorflow/python/util/compat.py", line 84, in as_text
      return bytes_or_text.decode(encoding)
  UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte
  </code></pre>
  
  <p>And the error line in my code is :</p>
  
  <pre><code>...
  image_data = tf.gfile.GFile(FLAGS.datasets + imname, 'r').read()
  image = coder.decode_jpeg(image_data)
  ...
  </code></pre>
  
  <p>My tensorflow is 1.3 and python is 3.5.And this code can run in tensorflow 1.0,python 2.7.Why it can't run in tensorflow is 1.3 and python is 3.5?
  The code is in datasets/data2record.py in:<a href="https://github.com/xiaodiu2010/TextBoxes-TensorFlow" rel="nofollow noreferrer">https://github.com/xiaodiu2010/TextBoxes-TensorFlow</a>
  Does someone can help me?</p>