mrmin123 / kancolle-auto

Kantai Collection (Kancolle) bot/automation tool - DEPERECATED - see kcauto-kai:
https://github.com/mrmin123/kcauto-kai
54 stars 22 forks source link

FindFailed Eror (?) #271

Closed Danielosama closed 7 years ago

Danielosama commented 7 years ago

Environment details

Issue

Is the issue consistent (can be reproduced consistently) or is it transient (only happens sometimes)?: Transient. It has happened 2 days in a row though (and while I was asleep, so I don't really know what happened)

Console log (if applicable)

[2017-02-04 05:11:26] Non-catbomb script crash, or catbomb script crash w/ unsupported Viewer!
FindFailed: sortie_top_combat.png: (68x22) seen at (830, 154) with 1,00 in S(0)[0,0 1366x768] E:Y, T:3,0
  Line 2718, in file Region.java

[error] script [ C:\SikuliX\kancolle_auto.sikuli ] stopped with error in line 526
[error] FindFailed ( sortie_top_combat.png: (68x22) seen at (830, 154) with 1,00 in S(0)[0,0 1366x768] E:Y, T:3,0 )
[error] --- Traceback --- error source first
line: module ( function ) statement
549: util (  pattern_generator )     m = match(r'M\[\d+\,\d+ (\d+)x(\d+)\]', str(find(pic)))
524: util (  wait_and_click )     kc_region.wait(pattern_generator(kc_region, pic, expand), time)
449: util (  rnavigation )     wait_and_click(kc_region, final_target, 5)
226: main (  sortie_action )     rnavigation(global_regions['game'], 'combat', settings, 2)
462: main (  kancolle_auto_wrapper )     sortie_action()
524: main (  <module> )     kancolle_auto_wrapper()
[error] --- Traceback --- end --------------

Relevant config snippet (if applicable)

Program: KanColleViewer!
RecoveryMethod: Browser
BasicRecovery: False
JSTOffset: 0
SleepCycle: 20
Paranoia: 1
SleepModifier: 7

I do realise it is a Findfailed error, but as you can see my SleepModifier is already at 7, so I'm kinda lost :x

mrmin123 commented 7 years ago

Are you still getting this error? What version of Sikuli are you on at the moment?

Could you try modifying the pattern_generator function in util.py? Replace the following:

        else:
            m = match(r'M\[\d+\,\d+ (\d+)x(\d+)\]', str(find(pic)))

with

        else:
            print find(pic)
            m = match(r'M\[\d+\,\d+ (\d+)x(\d+)\]', str(find(pic)))

Run it until you see the error, then report back with the crashlog.

Danielosama commented 7 years ago

Ever since I posted this it has not happened again; I'll modify what you told me in the case it happens once more. I have installed Sikulixsetup-1.1.1-20170115 (the one from your installation instructions).

mrmin123 commented 7 years ago

OK, thanks. I asked about the Sikuli version in case you were on a version with different outputs.

I'm closing this for now, but please re-open if the error pops up again.