perryhuynh / kcauto

kcauto, the successor to kancolle-auto, a Kantai Collection (Kancolle) bot/automation tool
GNU General Public License v3.0
68 stars 22 forks source link

Unable to send the A2 expedition #376

Closed stackhanovets closed 4 years ago

stackhanovets commented 5 years ago

Please make sure you are on the latest version of kcauto, and that there is not already a ticket open for your issue.

Please remove sections of this template you do not find relevant when creating your ticket.

Environment details

Issue variability

Is the issue consistent (can be reproduced consistently) or is it intermittent (only happens sometimes)?:

Consistent

Issue

Please provide a thorough description of the issue. Screenshots, videos, or at least a step-by-step description of what is happening in the game is typically necessary to debug.

Crashes during processing the routine task.

Log

[insert ~50 lines of console log (or more) here; remove section if irrelevant]

[error] RunTimeINIT: *** BE AWARE: Running on Java 8+ *** Please report problems ***
[DATE TIME] Initializing config module.
[DATE TIME] Reading config.
[DATE TIME] Starting kcauto!
[log] App.focus:  [3584:Chrome]
[DATE TIME] At side menu
[DATE TIME] Going home.
[log] CLICK on L(197,471)@S(0)[0,0 1920x1080] (523 msec)
[log] App.focus:  [3584:Chrome]
[DATE TIME] At home
[DATE TIME] Navigating to expedition screen.
[log] CLICK on L(403,506)@S(0)[0,0 1920x1080] (521 msec)
[log] CLICK on L(1140,526)@S(0)[0,0 1920x1080] (522 msec)
[DATE TIME] Sortieing fleet 2 to expedition A1
[log] CLICK on L(289,766)@S(0)[0,0 1920x1080] (522 msec)
[log] CLICK on L(545,699)@S(0)[0,0 1920x1080] (524 msec)
[log] CLICK on L(549,697)@S(0)[0,0 1920x1080] (529 msec)
[log] CLICK on L(537,700)@S(0)[0,0 1920x1080] (524 msec)
[log] CLICK on L(556,693)@S(0)[0,0 1920x1080] (524 msec)
[DATE TIME] Click position 404,519.
[log] CLICK on L(1189,743)@S(0)[0,0 1920x1080] (522 msec)
[log] CLICK on L(1067,745)@S(0)[0,0 1920x1080] (521 msec)
[DATE TIME] Fleet 2 sortied. Expected return time: DATE TIME
[DATE TIME] Sortieing fleet 3 to expedition A3
[log] CLICK on L(283,766)@S(0)[0,0 1920x1080] (522 msec)
[DATE TIME] Click position 658,610.
[log] CLICK on L(1060,738)@S(0)[0,0 1920x1080] (524 msec)
[log] CLICK on L(730,257)@S(0)[0,0 1920x1080] (529 msec)
[log] CLICK on L(1125,753)@S(0)[0,0 1920x1080] (523 msec)
[DATE TIME] Fleet 3 sortied. Expected return time: DATE TIME
[DATE TIME] Sortieing fleet 4 to expedition A2
[log] CLICK on L(318,758)@S(0)[0,0 1920x1080] (522 msec)
[error] script [ ..\kcauto\kcauto.sikuli ] stopped with error at line unknown
[error] Error caused by: Traceback (most recent call last):
  File "..\kcauto\kcauto.sikuli\kcauto.py", line 62, in <module>
    kcauto.run_expedition_cycle()
  File "..\kcauto\kcauto.sikuli\kcauto.py", line 62, in <module>
    kcauto.run_expedition_cycle()
  File "..\kcauto\kcauto.sikuli\main.py", line 255, in run_expedition_cycle
    self.modules['expedition'].sortie_expedition(fleet)
  File "..\kcauto\kcauto.sikuli\expedition.sikuli\expedition.py", line 103, in sortie_expedition
    self.navigate_to_expedition(fleet)
  File "..\kcauto\kcauto.sikuli\expedition.sikuli\expedition.py", line 190, in navigate_to_expedition
    if expedition_name[0] == '5':
IndexError: index out of range: 0

Config

[insert relevant config sections here; remove section if irrelevant]

[Expeditions]
Enabled: True
Fleet2: A1
Fleet3: A3
Fleet4: A2
ForsakenRei commented 5 years ago

Same here. Did you also finish A4? I think before that A2 worked fine on my end.

stackhanovets commented 5 years ago

Nope.

w1

ForsakenRei commented 5 years ago

Hmmm... My A2 is assigned to fleet 2 and I even cannot send any other expeditions with fleet 2 for a few trails. A restart of both kcauto and 74eo fixed it but still not work with A2. I use KAGA and the script will stuck on sending A2 out then crash and retry. It looks like it cannot find A2...

mrmin123 commented 5 years ago

I haven't had a chance to look into this further but I suspect this is another OCR issue. Can someone confirm by adding some print statements to the logs for what the identified OCR value is, and/or modifying the OCR capture field by a few pixels?

On Mon, Aug 26, 2019 at 9:52 AM ForsakenRei notifications@github.com wrote:

Hmmm... My A2 is assigned to fleet 2 and I even cannot send any other expeditions with fleet 2 for a few trails. A restart of both kcauto and 74eo fixed it but still not work with A2. I use KAGA and the script will stuck on sending A2 out then crash and retry. It looks like it cannot find A2...

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mrmin123/kcauto/issues/376?email_source=notifications&email_token=ABBALUX2JDDIDT7LV3JHQO3QGQC43A5CNFSM4IPGAEEKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5E6TGY#issuecomment-524937627, or mute the thread https://github.com/notifications/unsubscribe-auth/ABBALUREIK6TKG4EA7JSULLQGQC43ANCNFSM4IPGAEEA .

Kiras756 commented 5 years ago

I'm also have OCR error, but tied up with timer. (some time later I'll create dedicated thread)

ForsakenRei commented 4 years ago

@stackhanovets Somehow I fixed the problem on my end. The font rendering of my browser is different from the screenshots that kcauto uses. Just like your screenshot, all my characters will be bolder than them in kcauto's original screenshots. Therefore I made new screenshots for A2 and A3 and they are fine now. You can try to use the attached files or make new screenshots by yourself.

expedition_A2 expedition_A3

mrmin123 commented 4 years ago

Please note that the above workaround is only applicable in kcauto versions older than 7.4.0. 7.4.0+ attempts to use OCR to determine the expedition to perhaps even less success.

The next version of kcauto will not have this problem.

ForsakenRei commented 4 years ago

Thanks for let us know.

mrmin123 commented 4 years ago

As of v8.0.0-rc1 kcauto no longer relies on OCR.

1Azami1 commented 4 years ago

For anyone still using the pre-v8 kcauto, clearing A3 and unlocking A4 is the trigger to this, just discovered it the hard way

Why and how is this even a thing