← Back to team overview

sikuli-driver team mailing list archive

[Bug 705203] [NEW] Name error file not defined samecode executes in NetBeans editor

 

Public bug reported:

The following code executes perfectly in the Netbeans editor using Sikuli 10.2 yet when executed in the Sikuli 10 IDE 
"NameError: name 'filename' is not defined'

Error returned on W7x32

import glob
import os
import subprocess
import ConfigParser
import string
import commands

config = ConfigParser.RawConfigParser()

config.read('C:\\SikuliTest\\UserB.ini')

global WebPath
WebPath =('Z:\\ZZZautomation\\Web\\')

BuildPath = ("Z:\BUILDS\Daily_BUILDS\QA_MainBranch_Install\*.install")
BuildNumber =  glob.glob("Z:\BUILDS\Daily_BUILDS\QA_MainBranch_Install\*.install")
for filename in BuildNumber:
      SmokeTestInfo = "SmokeTest_Build " + filename[45:50] + " Iteration 44"+".htm"
global Number
Number = filename[45:50]

** Affects: sikuli
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/705203

Title:
  Name error file not defined samecode executes in NetBeans editor

Status in Sikuli:
  New

Bug description:
  The following code executes perfectly in the Netbeans editor using Sikuli 10.2 yet when executed in the Sikuli 10 IDE 
  "NameError: name 'filename' is not defined'

  Error returned on W7x32

  import glob
  import os
  import subprocess
  import ConfigParser
  import string
  import commands

  config = ConfigParser.RawConfigParser()

  config.read('C:\\SikuliTest\\UserB.ini')

  global WebPath
  WebPath =('Z:\\ZZZautomation\\Web\\')

  BuildPath = ("Z:\BUILDS\Daily_BUILDS\QA_MainBranch_Install\*.install")
  BuildNumber =  glob.glob("Z:\BUILDS\Daily_BUILDS\QA_MainBranch_Install\*.install")
  for filename in BuildNumber:
        SmokeTestInfo = "SmokeTest_Build " + filename[45:50] + " Iteration 44"+".htm"
  global Number
  Number = filename[45:50]





Follow ups

References