title: Getting InvalidArgumentError: NewRandomAccessFile failed to Create/Open while working with tf.data on the custom image dataset
body: <p>Code:</p>
  
  <pre><code>dataset = tf.data.Dataset.from_tensor_slices((filenames, labels))
  dataset = dataset.map(_parseJpeg, num_parallel_calls = nthread)
  
  dataset = dataset.batch(batch_size)     
  dataset = dataset.prefetch(batch_size)
  
  iterator = dataset.make_one_shot_iterator()
  images, labels = iterator.get_next()
  
   with tf.Session() as sess:
      sess.run([images, labels])
  </code></pre>
  
  <blockquote>
    <p>Traceback (most recent call last):
      File "D:\Python\Anaconda\envs\tf\lib\site-packages\tensorflow\python\client\session.py", line 1278, in _do_call
        return fn(*args)
      File "D:\Python\Anaconda\envs\tf\lib\site-packages\tensorflow\python\client\session.py", line 1263, in _run_fn
        options, feed_dict, fetch_list, target_list, run_metadata)
      File "D:\Python\Anaconda\envs\tf\lib\site-packages\tensorflow\python\client\session.py", line 1350, in _call_tf_sessionrun
        run_metadata)
    tensorflow.python.framework.errors_impl.InvalidArgumentError: NewRandomAccessFile failed to Create/Open: Tensor("arg0:0", shape=(), dtype=string) : The filename, directory name, or volume label syntax is incorrect.
    ; Unknown error
             [[Node: ReadFile = ReadFile]]
             [[Node: IteratorGetNext = IteratorGetNextoutput_shapes=[[?,224,224,3], [?,1000]], output_types=[DT_FLOAT, DT_FLOAT], _device="/job:localhost/replica:0/task:0/device:CPU:0"]]
             [[Node: IteratorGetNext/_1 = _Recvclient_terminated=false, recv_device="/job:localhost/replica:0/task:0/device:GPU:0", send_device="/job:localhost/replica:0/task:0/device:CPU:0", send_device_incarnation=1, tensor_name="edge_37_IteratorGetNext", tensor_type=DT_FLOAT, _device="/job:localhost/replica:0/task:0/device:GPU:0"]]</p>
    
    <p>During handling of the above exception, another exception occurred:</p>
    
    <p>Traceback (most recent call last):
      File "vgg16_train_batch_processing.py", line 231, in 
        sess.run(optimizer)
      File "D:\Python\Anaconda\envs\tf\lib\site-packages\tensorflow\python\client\session.py", line 877, in run
        run_metadata_ptr)
      File "D:\Python\Anaconda\envs\tf\lib\site-packages\tensorflow\python\client\session.py", line 1100, in _run
        feed_dict_tensor, options, run_metadata)
      File "D:\Python\Anaconda\envs\tf\lib\site-packages\tensorflow\python\client\session.py", line 1272, in _do_run
        run_metadata)
      File "D:\Python\Anaconda\envs\tf\lib\site-packages\tensorflow\python\client\session.py", line 1291, in _do_call
        raise type(e)(node_def, op, message)
    tensorflow.python.framework.errors_impl.InvalidArgumentError: NewRandomAccessFile failed to Create/Open: Tensor("arg0:0", shape=(), dtype=string) : The filename, directory name, or volume label syntax is incorrect.
    ; Unknown error
             [[Node: ReadFile = ReadFile]]
             [[Node: IteratorGetNext = IteratorGetNextoutput_shapes=[[?,224,224,3], [?,1000]], output_types=[DT_FLOAT, DT_FLOAT], _device="/job:localhost/replica:0/task:0/device:CPU:0"]]
             [[Node: IteratorGetNext/_1 = _Recvclient_terminated=false, recv_device="/job:localhost/replica:0/task:0/device:GPU:0", send_device="/job:localhost/replica:0/task:0/device:CPU:0", send_device_incarnation=1, tensor_name="edge_37_IteratorGetNext", tensor_type=DT_FLOAT, _device="/job:localhost/replica:0/task:0/device:GPU:0"]]</p>
  </blockquote>