title: python error: TypeError: an integer is required
body: <p>I'm working on my python script as I'm stored the list of elements in the arrays.</p>
  
  <p>I have got a very weird error when I'm trying to put each element in the <code>getControl</code> to allowed me to change the width size. I can get the list of elements from the arrays without have any problem.</p>
  
  <p>When I try this:</p>
  
  <pre><code>programs_width = list()
  for pos_X, prog_width, prog_ids in zip(program_X, program_width, program_id):
      if pos_X == '1073':    
          #30 mins
          if prog_width == '342':
              programs_width = 181
  
          #1 hour
          if prog_width == '691':
              programs_width = 181
  
          #need to find out how to get the programs_width outside
          print programs_width
          print prog_ids
          self.getControl(prog_ids).setWidth(programs_width)
  </code></pre>
  
  <p>It give me an error:</p>
  
  <pre><code>01:03:24 T:2084   ERROR: Exception in thread All_Channels_BACKUP_thread:
  Traceback (most recent call last):
  File "C:\Program Files (x86)\XBMC\system\python\Lib\threading.py", line 532, in __bootstrap_inner
  self.run()
  File "C:\Users\user\AppData\Roaming\XBMC\addons\script.tvguide\test.py", line 8158, in run
  self.xtarget()
  File "C:\Users\user\AppData\Roaming\XBMC\addons\script.tvguide\test.py", line 1410, in All_Channels_BACKUP                                                   self.getControl(str(prog_ids)).setWidth(str(programs_width))
  TypeError: an integer is required
  </code></pre>
  
  <p>The error are jumping on this line:</p>
  
  <pre><code>self.getControl(prog_ids).setWidth(programs_width)
  </code></pre>
  
  <p>Here is a output for the width and ids:</p>
  
  <pre><code>01:13:18 T:5032  NOTICE: 181
  01:13:18 T:5032  NOTICE: 3072
  01:13:18 T:5032  NOTICE: 181
  01:13:18 T:5032  NOTICE: 3211
  01:13:18 T:5032  NOTICE: 181
  01:13:18 T:5032  NOTICE: 3279
  01:13:18 T:5032  NOTICE: 181
  01:13:18 T:5032  NOTICE: 3348
  01:13:18 T:5032  NOTICE: 181
  01:13:18 T:5032  NOTICE: 3417
  </code></pre>
  
  <p>I got no idea why I have an error, all I'm trying to do is to use the variable <code>prog_ids</code> to get each element from the arrays to put each id in the <code>getcontrol</code> before I could use the variable <code>programs_width</code> to change the width size each time. 
  The type for <code>program_width</code> is <code>int</code> and the type for <code>prog_id</code> is <code>str</code> which is a string.</p>
  
  <p>Do you know why I have got an error and do you know how to fix it?</p>
  
  <p>Edit: I realised that the problem are coming from this line:</p>
  
  <pre><code> elif pos_X == '1073':
  </code></pre>
  
  <p>Here is the list of elements:</p>
  
  <pre><code>15:34:08 T:5872  NOTICE: 375
  15:34:08 T:5872  NOTICE: 724
  15:34:08 T:5872  NOTICE: 2804
  15:34:08 T:5872  NOTICE: 5226
  15:34:08 T:5872  NOTICE: 5924
  15:34:08 T:5872  NOTICE: 6273
  15:34:08 T:5872  NOTICE: 6622
  15:34:08 T:5872  NOTICE: 6971
  15:34:08 T:5872  NOTICE: 7320
  15:34:08 T:5872  NOTICE: 7669
  15:34:08 T:5872  NOTICE: 8018
  15:34:08 T:5872  NOTICE: 8716
  15:34:08 T:5872  NOTICE: 9065
  15:34:08 T:5872  NOTICE: 9414
  15:34:08 T:5872  NOTICE: 9763
  15:34:08 T:5872  NOTICE: 10112
  15:34:08 T:5872  NOTICE: 10461
  15:34:08 T:5872  NOTICE: 10810
  15:34:08 T:5872  NOTICE: 11159
  15:34:08 T:5872  NOTICE: 11508
  15:34:08 T:5872  NOTICE: 11857
  15:34:08 T:5872  NOTICE: 12206
  15:34:08 T:5872  NOTICE: 13937
  15:34:08 T:5872  NOTICE: 14635
  15:34:08 T:5872  NOTICE: 14984
  15:34:08 T:5872  NOTICE: 15333
  15:34:08 T:5872  NOTICE: 15682
  15:34:08 T:5872  NOTICE: 16031
  15:34:08 T:5872  NOTICE: 16380
  15:34:08 T:5872  NOTICE: 16729
  15:34:08 T:5872  NOTICE: 17078
  15:34:08 T:5872  NOTICE: 17427
  15:34:08 T:5872  NOTICE: 17776
  15:34:08 T:5872  NOTICE: 18125
  15:34:08 T:5872  NOTICE: 18474
  15:34:08 T:5872  NOTICE: 18823
  15:34:08 T:5872  NOTICE: 19172
  15:34:08 T:5872  NOTICE: 19521
  15:34:08 T:5872  NOTICE: 19870
  15:34:08 T:5872  NOTICE: 20219
  15:34:08 T:5872  NOTICE: 20568
  15:34:08 T:5872  NOTICE: 20917
  15:34:08 T:5872  NOTICE: 22648
  15:34:08 T:5872  NOTICE: 23346
  15:34:08 T:5872  NOTICE: 23695
  15:34:08 T:5872  NOTICE: 24044
  15:34:08 T:5872  NOTICE: 24393
  15:34:08 T:5872  NOTICE: 24742
  15:34:08 T:5872  NOTICE: 25091
  15:34:08 T:5872  NOTICE: 25440
  15:34:08 T:5872  NOTICE: 26138
  15:34:08 T:5872  NOTICE: 26487
  15:34:08 T:5872  NOTICE: 26836
  15:34:08 T:5872  NOTICE: 27185
  15:34:08 T:5872  NOTICE: 27534
  15:34:08 T:5872  NOTICE: 27883
  15:34:08 T:5872  NOTICE: 28232
  15:34:08 T:5872  NOTICE: 28581
  15:34:08 T:5872  NOTICE: 28930
  15:34:08 T:5872  NOTICE: 29279
  15:34:08 T:5872  NOTICE: 29628
  15:34:08 T:5872  NOTICE: 31359
  15:34:08 T:5872  NOTICE: 32057
  15:34:08 T:5872  NOTICE: 32406
  15:34:08 T:5872  NOTICE: 32755
  15:34:08 T:5872  NOTICE: 33104
  15:34:08 T:5872  NOTICE: 33453
  15:34:08 T:5872  NOTICE: 33802
  15:34:08 T:5872  NOTICE: 34151
  15:34:08 T:5872  NOTICE: 375
  15:34:08 T:5872  NOTICE: 1073
  15:34:08 T:5872  NOTICE: 3153
  </code></pre>