title: list index out of range(sometimes fails sometimes works)
body: <p>I'm reading datas from a file. content: time-id-data,
  when I run on MAC, it works well, but on linux, sometimes it works sometimes fails. 
  the error is "IndexError: list index out of range"
  data like this:</p>
  
  <p><img src="https://i.stack.imgur.com/CTiNs.png" alt="enter image description here"></p>
  
  <p>'
  1554196690  0.0 178 180 180 178 178 178 180</p>
  
  <p>1554196690  0.1 178 180 178 180 180 178 178</p>
  
  <p>1554196690  0.2 175 171 178 173 173 178 172</p>
  
  <p>1554196690  0.3 171 175 175 17b 179 177 17e</p>
  
  <p>1554196691  0.4 0   d3</p>
  
  <p>1554196691  0.50    28:10:4:92:a:0:0:d6     395</p>
  
  1554196691  0.58    28:a2:23:93:a:0:0:99        385
  '
  <pre><code>data = []
  boardID=100 #how many lines at most in datafile
  for i in range(8):
      data.append([[] for x in range(8)])#5 boards,every boards have 7 sensors add 1-boardID
  
  time_stamp = []
  time_xlabel=[]
  time_second=[]
  for i in range(8):
      time_stamp.append([]) #5th-lines data is the input voltage and pressure
      time_xlabel.append([])#for x label
      time_second.append([])#time from timestamp to time(start-time is 0)
  
  with open("Potting_20190402-111807.txt","r") as eboardfile:
      for line in eboardfile:
          values = line.strip().split("\t")
          boardID=int(round(float(values[1])%1*10)) #define board, 0-3 is the electronBoards, board4-pressure sensor, board5-temperature sensor located inside house not on eboard.
          time_stamp[boardID].append(int(values[0]))
  
          if boardID &gt;= 0 and boardID &lt; 4:
              for i in range(2,9):
                  data[boardID][i-2].append(int(values[i],16) * 0.0625)
  
          if boardID==4:#pressure
              data[boardID][0].append( int(values[2],16) * 5./1024. *14.2/2.2)            #voltage divider: 12k + 2.2k
              data[boardID][1].append( (int(values[3],16) * 5./1024. - 0.5) / 4.*6.9*1000.)      #adc to volt: value * 5V/1024, volt to hpa: (Vout - 0.5V)/4V *6.9bar * 1000i
  
          elif boardID &gt; 4 and boardID &lt; 7: #temperature sensor located inside house not no electronBoards
              data[boardID][0].append(int(values[4],10) * 0.0625)#values[2] is the address,[3]-empty;[4]is the valueself.
  eboardfile.close()
  </code></pre>
  
  <hr>
  
  <pre><code> Traceback(most recent call last):
        boardID=int(round(float(values[1])%1*10)) #define board, 0-3 is the electronBoards, board4-pressure sensor, board5-temperature sensor located inside house not on eboard.
  IndexError: list index out of range
  </code></pre>