title: Abaqus Python script to open several odb files by variable name
body: <p>I have a txt-file called "odbList.txt" which contains the names of several odb-files.</p>
  
  <pre><code>plate_2mm.odb
  plate_4mm.odb
  plate_6mm.odb
  </code></pre>
  
  <p>Now I wrote a Python Script, where I want to open each of these files in a loop.</p>
  
  <pre><code>    # list of ODB-Files
      odbList = [ ]
      f = file( 'W:/someDirectory/odbList.txt' , 'r')
      count = 0
      for line in f.readlines() :
          odbList.append (line)
          count = count + 1
  
      def getSIF(case, i):
          odb = openOdb(path = 'W:/someDirectory/' + case)
  
      # start analyses for each case
      for i in xrange(0,count):
          getSIF(odbList[i], i)
  </code></pre>
  
  <p>I get the following error message:</p>
  
  <pre><code>OdbError: Cannot open file W:/someDirectory/plate_2mm.odb
  . *** ERROR: No such file: W:/someDirectory/plate_2mm.odb
  </code></pre>
  
  <p>The weird thing however is that it works perfectly fine when I hardcode the complete path.</p>
  
  <p>Another weird thing. If I use this line instead:</p>
  
  <pre><code>odb = openOdb(path = case)
  </code></pre>
  
  <p>I get following error message:</p>
  
  <pre><code>OdbError: Cannot open file C:/Temp/plate_2mm.odb
  . *** ERROR: No such file: C:/Temp/plate_2mm.odb
  </code></pre>
  
  <p>And if I transfer all my files into C:/Temp everything works fine. But why doesn't it work if I use the first version / a different folder? Especially since it is working when hardcoded.</p>