title: How do I make the string a raw string literal so that I can run cv2.imread() on it?
body: <pre><code>one = (r"C:\Users\Sam\OneDrive\Desktop\RateData\1")
  
  for feature in features[0]:
      backslash = '\\'
      imagePath = ((one)+backslash+"'"+str(feature)+"'")
      img = cv2.imread(imagePath)
      print(imagePath)
      print(img)
  </code></pre>
  
  <hr>
  
  <p>So the result of <code>print(imagePath)</code> is: 
     <code>C:\Users\Sam\OneDrive\Desktop\RateData\1\'1.1.jpg'</code></p>
  
  <hr>
  
  <p>The result of <code>print(img)</code> is:    <code>None</code></p>
  
  <hr>
  
  <p><code>feature</code> is just the image file name.  I wrote it like that so it would add the unique image file name to the path.</p>
  
  <p>So I tried running that through the <code>cv2.imread()</code> function and it returned <code>None</code>.
  I know that the reason it won't run is that it is just reading it as a string and doesn't recognize that as a raw string literal. I'm not a very experienced programmer so I tried all the ways I could think of (not very many) to get it to read the path as a raw string literal and it didn't work. So if any of you could help me out in making the string into that that would be awesome!</p>
  
  <p>Thanks for the help!</p>