Re: [Sikuli-driver] [Question #688770]: Division not working in Sikuli with Python

2020-02-14 Thread Jacco Peters
Question #688770 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/688770

Jacco Peters posted a new comment:
Thanks for that answers. It was indeed the difference between the python
versions

replacing

found_factor = tot_found/tot_words

by

found_factor = tot_found/float(tot_words)

solved it.

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #688770]: Division not working in Sikuli with Python

2020-02-14 Thread Jacco Peters
Question #688770 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/688770

Status: Answered => Solved

Jacco Peters confirmed that the question is solved:
Thanks Manfred Hampl, that solved my question.

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #688770]: Division not working in Sikuli with Python

2020-02-14 Thread Manfred Hampl
Question #688770 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/688770

Manfred Hampl proposed the following answer:
The behavior of integer divisions has changed between python2 and
python3.

In python2 dividing an integer by an integer (5/2) results in an integer (=2) 
(fraction of result cut off).
In python3 dividing an integer by an integer (5/2) results in a float result 
(=2.5). There is now a//b giving an integer result.

Maybe this is the explanation of the difference.

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #688770]: Division not working in Sikuli with Python

2020-02-14 Thread RaiMan
Question #688770 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/688770

Status: Open => Answered

RaiMan proposed the following answer:
not sure, what you are doing:

print int("5")/int("9")
print 5/9
x = "5"
y = "9"
z = int(x)/int(y)
print "zs", z
x = 5
y = 9
z = x/y
print "zi", z

prints

0
0
zs 0
zi 0

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


[Sikuli-driver] [Bug 1863150] Re: [error] EditorPane: read returned Width (0) and height (50) cannot be <= 0

2020-02-14 Thread yop
Thanks for your reply RaiMan.
No time to try the 2.0 now but i will try it !
For information the script works fine whith theses smalls images, it's only 
when i'm loading the script. Impossible to open it.
I try whith the same picture but whith 5 pixels and it is ok.
For know, i will be my "workaround" :-) 

Best Regards.
Xavier

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

Title:
  [error] EditorPane: read returned Width (0) and height (50) cannot be
  <= 0

Status in Sikuli:
  Won't Fix

Bug description:
  Hello,

  When i try to open a Sikuli Script from the IDE, i have this error :
  [error] EditorPane: read returned Width (0) and height (50) cannot be <= 0

  I launch the IDE in debug mode via "nohup ./runsikulix -d 3" and it seems 
some pictures are the problem.
  I think it is some picture whith a small size like 2 pixels x 80 pixels.
  Do you think the problem comes from that ?
  I have another picture whith similar size who are ok.

  Sikuli 1.1.3 / IDE  / CentOs
  Thanks for your support
  Xavier

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

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


[Sikuli-driver] [Question #688770]: Division not working in Sikuli with Python

2020-02-14 Thread Jacco Peters
New question #688770 on Sikuli:
https://answers.launchpad.net/sikuli/+question/688770

I'm trying to divide 2 numbers in Python. When I do this within Sikuli the 
results keeps being 0. Whereas when I do this in Pycharm I get the expected 
result. Can anybody help me please. I'm a bit stuck.

Code:

tot_words = '9'
tot_found = '5'

tot_words=int(tot_words)
tot_found=int(tot_found)

if tot_words == 0:
print(' found_factor = 0')
found_factor = 0
else:
found_factor = tot_found/tot_words
print('y found_factor > 0')
print('tot_found: ' + str(tot_found))
print('tot_words: ' + str(tot_words))

print('found_factor1: ' + str(found_factor))


Result in Sikuli IDE NOT as expected

y found_factor > 0
tot_found: 5
tot_words: 9
found_factor1: 0

Result in Pycharm is as expected:

y found_factor > 0
tot_found: 5
tot_words: 9
found_factor1: 0.5556

Process finished with exit code 0

Can somebody explain the difference. That would be very  much appreciated





-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #688756]: App.open() and subprocess.Popen don't open a jar file on Mac OS (Sikuli version 2.0.0)

2020-02-14 Thread Aleks Kozaev
Question #688756 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/688756

Aleks Kozaev confirmed that the question is solved:
Thanks RaiMan, that solved my question.

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #688756]: App.open() and subprocess.Popen don't open a jar file on Mac OS (Sikuli version 2.0.0)

2020-02-14 Thread Aleks Kozaev
Question #688756 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/688756

Status: Answered => Solved

Aleks Kozaev confirmed that the question is solved:
Thank you for quick replies. This worked for me too. Seems that I typed
the path wrong, hence nothing happened at first.

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


[Sikuli-driver] [Bug 1797505] Re: [1.1.4] Windows special versions N/KN: can't find dependent libraries with opencv_java342.dll --- workaround

2020-02-14 Thread RaiMan
** Description changed:

  *** workaround
  the N and KN versions come without a bunch of media related libraries.
  This apparently makes it impossible to use OpenCV.
  
- So use a normal Windows version or install the available media package from 
Microsoft.
+ So use a normal Windows version or install the available media package
+ from Microsoft.
+ 
+ --- a solution from comment #14:
+ I had this problem on Windows Server 2012 R2 and solved it by installing 
Desktop Experience from Control Panel.
  --
  
  [error] RunTimeIDE: opencv_java342.dll loaded, but it might be a problem with 
ne
  eded dependent libraries
  ERROR: ...TEMP...: Can't find dependent libraries
  [error] RunTimeIDE: *** terminating: problem with native library: 
opencv_java34
  2.dll

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

Title:
  [1.1.4] Windows special versions N/KN: can't find dependent libraries
  with opencv_java342.dll --- workaround

Status in Sikuli:
  Won't Fix

Bug description:
  *** workaround
  the N and KN versions come without a bunch of media related libraries.
  This apparently makes it impossible to use OpenCV.

  So use a normal Windows version or install the available media package
  from Microsoft.

  --- a solution from comment #14:
  I had this problem on Windows Server 2012 R2 and solved it by installing 
Desktop Experience from Control Panel.
  --

  [error] RunTimeIDE: opencv_java342.dll loaded, but it might be a problem with 
ne
  eded dependent libraries
  ERROR: ...TEMP...: Can't find dependent libraries
  [error] RunTimeIDE: *** terminating: problem with native library: 
opencv_java34
  2.dll

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

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


[Sikuli-driver] [Bug 1863150] Re: [error] EditorPane: read returned Width (0) and height (50) cannot be <= 0

2020-02-14 Thread RaiMan
Sorry, but 1.1.3 is no longer supported.

Try with 2.0.2 (be aware:
https://sikulix-2014.readthedocs.io/en/latest/newslinux.html#version-2-0-2
-special-for-linux-people)

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

Title:
  [error] EditorPane: read returned Width (0) and height (50) cannot be
  <= 0

Status in Sikuli:
  Won't Fix

Bug description:
  Hello,

  When i try to open a Sikuli Script from the IDE, i have this error :
  [error] EditorPane: read returned Width (0) and height (50) cannot be <= 0

  I launch the IDE in debug mode via "nohup ./runsikulix -d 3" and it seems 
some pictures are the problem.
  I think it is some picture whith a small size like 2 pixels x 80 pixels.
  Do you think the problem comes from that ?
  I have another picture whith similar size who are ok.

  Sikuli 1.1.3 / IDE  / CentOs
  Thanks for your support
  Xavier

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

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


[Sikuli-driver] [Bug 1863150] Re: [error] EditorPane: read returned Width (0) and height (50) cannot be <= 0

2020-02-14 Thread RaiMan
** Changed in: sikuli
   Status: New => Won't Fix

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

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

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

Title:
  [error] EditorPane: read returned Width (0) and height (50) cannot be
  <= 0

Status in Sikuli:
  Won't Fix

Bug description:
  Hello,

  When i try to open a Sikuli Script from the IDE, i have this error :
  [error] EditorPane: read returned Width (0) and height (50) cannot be <= 0

  I launch the IDE in debug mode via "nohup ./runsikulix -d 3" and it seems 
some pictures are the problem.
  I think it is some picture whith a small size like 2 pixels x 80 pixels.
  Do you think the problem comes from that ?
  I have another picture whith similar size who are ok.

  Sikuli 1.1.3 / IDE  / CentOs
  Thanks for your support
  Xavier

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

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #688699]: Do.popup not working in 2.0.2 --- fixed in 2.0.3

2020-02-14 Thread RaiMan
Question #688699 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/688699

Summary changed to:
Do.popup not working in 2.0.2 --- fixed in 2.0.3

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #688699]: Do.popup not working in 2.0.2

2020-02-14 Thread RaiMan
Question #688699 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/688699

RaiMan proposed the following answer:
@masuo thanks for the pointer.

the solution is available in 2.0.3 latest on Monday (sorry for the
delay)

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #688756]: App.open() and subprocess.Popen don't open a jar file on Mac OS (Sikuli version 2.0.0)

2020-02-14 Thread RaiMan
Question #688756 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/688756

Status: Open => Answered

RaiMan proposed the following answer:
this worked for me:
import subprocess as Sub
Sub.Popen(("java", "-jar", 
"/Users/raimundhocke/IdeaProjects/SikuliX/API/target/sikulixapi-2.1.0-SNAPSHOT-complete.jar"))

... and is currently the only way on Mac, to start something, that is
not a macOS application (some.app)

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #688756]: App.open() and subprocess.Popen don't open a jar file on Mac OS (Sikuli version 2.0.0)

2020-02-14 Thread Aleks Kozaev
Question #688756 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/688756

Status: Needs information => Open

Aleks Kozaev gave more information on the question:
Yes, this works from commandline (both on windows and mac)

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #688329]: how to write py script in sikuli for appending the pass and fail test case in single class

2020-02-14 Thread Launchpad Janitor
Question #688329 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/688329

Status: Open => Expired

Launchpad Janitor expired the question:
This question was expired because it remained in the 'Open' state
without activity for the last 15 days.

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #688756]: App.open() and subprocess.Popen don't open a jar file on Mac OS (Sikuli version 2.0.0)

2020-02-14 Thread RaiMan
Question #688756 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/688756

Status: Open => Needs information

RaiMan requested more information:
does

java -jar your.jar

work from commandline?

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp