← Back to team overview

sikuli-driver team mailing list archive

[Bug 862060] Re: X-1.0rc3 (931): Windows7: Chinese: Crashes on capture and images not found

 

@ Edwin

That is true and must be so, since the capturing is handled in the
Sikuli frontend which talks utf-8. The problem only exists later, when
Sikuli tries to recall the image file whit find operations.

So you might capture with a unicode login account, but you should assure
(e.g. preferences image naming), that the final paths to the stored
image files do not contain any unicode characters.

** Summary changed:

- X-1.0rc3 (931): Windows7: Chinese: Crashes on capture and images not found
+ X-1.0rc3 (931): Windows7: Chinese: Crashes on capture and images not found --- problem: unicode in filenames

** Description changed:

+ *** related bug: bug 512476
+ 
+ *** workaround
+ --- make sure all filenames do not contain unicode characters
+ --- move Sikuli's tempdir to outside of your user environment: change Java system property java.io.tmpdir to do that. Try to run java with -Djava.io.tmpdir=[the temp path you like].
+ --- store your script in a location whose absolute path does not contain unicode characters
+ 
+ ------------------------------------------------
+ 
  Sikuli is so great! When the first time I heard about it it was only
  available on Mac, "what a pity!", I said. I just now noticed it supports
  Windows now! So I tried it. Unfortunately, it doesn't seem like my
  windows 7 Ultimate (Chinese) 64bit.
  
  I followed the getting started tutorial and tried capturing a portion of
  my screenshot (the Start button), once I selected a rectangular area,
  the program exited abnormally, without any error message. The result is
  the same no matter I clicked the capture screen toolbar button, or
  clicked the "Click" function name on the left list.
  
  So I also tried using another program to capture the Windows Start menu
  button and saved it to my disk, then manually added the following
  script:
  
  Click(<my-previously-saved-png-image>).
  
  And the log window shows the following:
  
- 
  [info] Sikuli vision engine loaded.
  [info] Windows utilities loaded.
  
  [info] VDictProxy loaded.
  
  [error] 被停止 (translation: stopped)
  [error] 第1行发生错误 (translation: error in line 1)
  [error] 错误信息 (translation: error message): Traceback (most recent call last):
-  File "C:\Users\????\AppData\Local\Temp\sikuli-tmp2386320233862351632.py", line 1, in 
-  click("start button.png")
-  Line 1, in file C:\Users\????\AppData\Local\Temp\sikuli-tmp2386320233862351632.py
+  File "C:\Users\????\AppData\Local\Temp\sikuli-tmp2386320233862351632.py", line 1, in
+  click("start button.png")
+  Line 1, in file C:\Users\????\AppData\Local\Temp\sikuli-tmp2386320233862351632.py
  
-  at org.sikuli.script.Region.handleFindFailed(Region.java:420) 
- at org.sikuli.script.Region.wait(Region.java:511) 
- at org.python.proxies.sikuli.Region$Region$0.super__wait(Unknown Source) 
- at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
- at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) 
- at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) 
- at java.lang.reflect.Method.invoke(Unknown Source) 
+  at org.sikuli.script.Region.handleFindFailed(Region.java:420)
+ at org.sikuli.script.Region.wait(Region.java:511)
+ at org.python.proxies.sikuli.Region$Region$0.super__wait(Unknown Source)
+ at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+ at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
+ at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
+ at java.lang.reflect.Method.invoke(Unknown Source)
  
  org.sikuli.script.FindFailed: FindFailed: can not find start button.png on the screen.
-  Line 1, in file C:\Users\????\AppData\Local\Temp\sikuli-tmp2386320233862351632.py
+  Line 1, in file C:\Users\????\AppData\Local\Temp\sikuli-tmp2386320233862351632.py

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

Title:
  X-1.0rc3 (931): Windows7: Chinese: Crashes on capture and images not
  found --- problem: unicode in filenames

Status in Sikuli:
  New

Bug description:
  *** related bug: bug 512476

  *** workaround
  --- make sure all filenames do not contain unicode characters
  --- move Sikuli's tempdir to outside of your user environment: change Java system property java.io.tmpdir to do that. Try to run java with -Djava.io.tmpdir=[the temp path you like].
  --- store your script in a location whose absolute path does not contain unicode characters

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

  Sikuli is so great! When the first time I heard about it it was only
  available on Mac, "what a pity!", I said. I just now noticed it
  supports Windows now! So I tried it. Unfortunately, it doesn't seem
  like my windows 7 Ultimate (Chinese) 64bit.

  I followed the getting started tutorial and tried capturing a portion
  of my screenshot (the Start button), once I selected a rectangular
  area, the program exited abnormally, without any error message. The
  result is the same no matter I clicked the capture screen toolbar
  button, or clicked the "Click" function name on the left list.

  So I also tried using another program to capture the Windows Start
  menu button and saved it to my disk, then manually added the following
  script:

  Click(<my-previously-saved-png-image>).

  And the log window shows the following:

  [info] Sikuli vision engine loaded.
  [info] Windows utilities loaded.

  [info] VDictProxy loaded.

  [error] 被停止 (translation: stopped)
  [error] 第1行发生错误 (translation: error in line 1)
  [error] 错误信息 (translation: error message): Traceback (most recent call last):
   File "C:\Users\????\AppData\Local\Temp\sikuli-tmp2386320233862351632.py", line 1, in
   click("start button.png")
   Line 1, in file C:\Users\????\AppData\Local\Temp\sikuli-tmp2386320233862351632.py

   at org.sikuli.script.Region.handleFindFailed(Region.java:420)
  at org.sikuli.script.Region.wait(Region.java:511)
  at org.python.proxies.sikuli.Region$Region$0.super__wait(Unknown Source)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
  at java.lang.reflect.Method.invoke(Unknown Source)

  org.sikuli.script.FindFailed: FindFailed: can not find start button.png on the screen.
   Line 1, in file C:\Users\????\AppData\Local\Temp\sikuli-tmp2386320233862351632.py

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


References