← Back to team overview

sikuli-driver team mailing list archive

[Bug 1212763] Re: [1.0.1] Windows: paths to Sikuli scripts make problems with some characters after the \'s (e.g. \t...)

 

** Summary changed:

- [1.0.1] Windows: paths to Sikuli scripts
+ [1.0.1] Windows: paths to Sikuli scripts make problems with some characters after the \'s (e.g. \t...)

** Changed in: sikuli
       Status: New => Fix Committed

** Changed in: sikuli
   Importance: Undecided => High

** Changed in: sikuli
     Assignee: (unassigned) => RaiMan (raimund-hocke)

** Changed in: sikuli
    Milestone: None => 1.1.0

** Description changed:

+ --- workaround
+ in the path above the scripts (the script names itself are not the problem)
+ put an underscore between the \ and the next letter:
+ 
+ example: before not working
+ c:\test\sikuli\testcases
+ 
+ workaround:
+ c:\_test\sikuli\_testcases
+ 
+ I will fix this as fast as possible. (Should be a peanut ;-)
+ Sorry for the inconvenience
+ 
+ ---------------------------------------------------------------
+ 
  Hello,
  yesterday I updated from May version of sikuli to the new one and the scripts that were running before begin to fail. Right now my problem is that during test case execution it looks for image files not in its home directory, but in other one:
  
  I've got a file structure
  c:\test\sikuli\bin    <- here are .jars and runIDE.cmd
  c:\test\sikuli\bin\libs    <- sikuli created directory with dlls
  c:\test\sikuli\testcases    <- the folder containing all the testcases as *.sikuli folders:
  ...\setup.sikuli
  ...\constants.sikuli
  ...\mytestcase.sikuli
  ...\mytestcase.sikuli\image.png
  
- 
  mytestcase text:
  ====
  libPath="c:\\test\\sikuli\\testcases\\"    <- had to import these 3 lines after sikuli update, because it refused to see modules anymore, though they're in the same folder
  if not libPath in sys.path:
-     sys.path.append(libPath)
+     sys.path.append(libPath)
  import setup
  import constants
  
  def someFunction(param):
-     click(constants.butOK)
-     click(wait("image.png"))    <- the error happens here
-     return 0
+     click(constants.butOK)
+     click(wait("image.png"))    <- the error happens here
+     return 0
  
- setup.doLogin() 
+ setup.doLogin()
  someFunction("someValue")
  exit(0)
  ====
  
  When I run it, it calls someFunction, goes up to the marked line and crashes with error:
  [error] image.png looks like a file, but not on disk. Assume it's text.
  [error] Region.find(text): text search is currently switched off
  [error] script [ mytestcase ] stopped with error in line 13
  [error] FindFailed ( Text search currently switched off )
  
  so it doesn't see the image file in its own directory. However, when I
  copy that file into c:\test\sikuli\testcases\setup.sikuli\, the script
  starts to work correctly! This happens now with every script I have
  
  Please advice, what's done wrong? I cannot move the images from all the
  scripts into one folder, there's tons of them

** Summary changed:

- [1.0.1] Windows: paths to Sikuli scripts make problems with some characters after the \'s (e.g. \t...)
+ [1.0.1] Windows: paths to Sikuli scripts make problems with some characters after the \'s (e.g. \t...) --- workaround

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

Title:
  [1.0.1] Windows: paths to Sikuli scripts make problems with some
  characters after the \'s (e.g. \t...) --- workaround

Status in Sikuli:
  Fix Committed

Bug description:
  --- workaround
  in the path above the scripts (the script names itself are not the problem)
  put an underscore between the \ and the next letter:

  example: before not working
  c:\test\sikuli\testcases

  workaround:
  c:\_test\sikuli\_testcases

  I will fix this as fast as possible. (Should be a peanut ;-)
  Sorry for the inconvenience

  ---------------------------------------------------------------

  Hello,
  yesterday I updated from May version of sikuli to the new one and the scripts that were running before begin to fail. Right now my problem is that during test case execution it looks for image files not in its home directory, but in other one:

  I've got a file structure
  c:\test\sikuli\bin    <- here are .jars and runIDE.cmd
  c:\test\sikuli\bin\libs    <- sikuli created directory with dlls
  c:\test\sikuli\testcases    <- the folder containing all the testcases as *.sikuli folders:
  ...\setup.sikuli
  ...\constants.sikuli
  ...\mytestcase.sikuli
  ...\mytestcase.sikuli\image.png

  mytestcase text:
  ====
  libPath="c:\\test\\sikuli\\testcases\\"    <- had to import these 3 lines after sikuli update, because it refused to see modules anymore, though they're in the same folder
  if not libPath in sys.path:
      sys.path.append(libPath)
  import setup
  import constants

  def someFunction(param):
      click(constants.butOK)
      click(wait("image.png"))    <- the error happens here
      return 0

  setup.doLogin()
  someFunction("someValue")
  exit(0)
  ====

  When I run it, it calls someFunction, goes up to the marked line and crashes with error:
  [error] image.png looks like a file, but not on disk. Assume it's text.
  [error] Region.find(text): text search is currently switched off
  [error] script [ mytestcase ] stopped with error in line 13
  [error] FindFailed ( Text search currently switched off )

  so it doesn't see the image file in its own directory. However, when I
  copy that file into c:\test\sikuli\testcases\setup.sikuli\, the script
  starts to work correctly! This happens now with every script I have

  Please advice, what's done wrong? I cannot move the images from all
  the scripts into one folder, there's tons of them

To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/1212763/+subscriptions


References