title: Error specifying the file path in Python
body: <p>I am new to python and do not know it very well.
  I want modified the online code to convert my image data to lmdb form.</p>
  
  <p>I given the root of my src and dst like below:
  paths_src = 'F:\caffe-windows\caffe-windows\data\sift-flow\test\'
  path_dst = 'F:\caffe-windows\caffe-windows\data\sift-flow\testlmdb'</p>
  
  <p>but after i run the code I got a error. it seem that my path is wrong? can anyone help? I also attach the code.</p>
  
  <pre><code>import os
  import numpy as np
  from scipy import io
  import lmdb
  import caffe
  from PIL import Image
  
  NUM_IDX_DIGITS = 10
  IDX_FMT = '{:0&gt;%d' % NUM_IDX_DIGITS + 'd}'
  
  print '1111'
  
  paths_src = 'F:\\caffe-windows\\caffe-windows\\data\\sift-flow\\test\\'
  path_dst = 'F:\\caffe-windows\\caffe-windows\\data\\sift-flow\\testlmdb'
  
  print '2222'
  
  def img_to_lmdb(paths_src,path_dst):
      in_db = lmdb.open(path_dst, map_size=int(1e9))
      with in_db.begin(write=True) as in_txn:
          for in_idx, in_ in enumerate(paths_src):
              print 'img:::'+str(in_)
              # load image:
              # - as np.uint8 {0, ..., 255}
              # - in BGR (switch from RGB)
              # - in Channel x Height x Width order (switch from H x W x C)
              im = np.array(Image.open(in_)) # or load whatever ndarray you need
              im = im[:,:,::-1]
              im = im.transpose((2,0,1))
              im_dat = caffe.io.array_to_datum(im)
              in_txn.put('{:0&gt;10d}'.format(in_idx), im_dat.SerializeToString())
      in_db.close()
  
  
  
  img_to_lmdb(paths_src,path_dst)
  print '3333'
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/cS2PX.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/cS2PX.png" alt="enter image description here"></a></p>