tehruttiger / Stockpiler

A Foxhole logi companion app for quickly reading and transcribing stockpile contents
28 stars 21 forks source link

Didn't detect stockpile. Error #21

Closed PeteNotFound closed 2 years ago

PeteNotFound commented 2 years ago

When I try scanning a stockpile I get the following message box: image The Stockpiler went through the modded learning without any problems and F2 takes a screenshot of the stockpile without any problems(Stockpile contents have been censored for obvious reasons): test_2022-05-09-122737 Tried with and without mods, with different Stockpiler settings and on different stockpiles(Bunker Base, Seaport(Public and reserved stockpile), Town Base).

JMDPatterson commented 2 years ago

I am also encounter the same issue

tehruttiger commented 2 years ago

Interesting. So it's still finding and cropping the stockpile, but just not successfully reading and tallying the results. Did it ask you to transcribe the title of the stockpile?

PeteNotFound commented 2 years ago

No it never asked me anything. The first time I had learning on and assigned all the modded icons which then correctly appeared in the corresponding folder and as soon as I assigned the final item the popup appeared. After that it was always the first thing that popped up once I pressed F3. After writing the issue post I had a lil look at the code and I assume the problem is caused within the loop on line 591 in Stockpiler.py. I had the "Probably not looking at a stockpile or don't have the game open" message 8 times in my command prompt. Sadly I don't know a lot of python which is why I couldn't find a quick fix.

tehruttiger commented 2 years ago

What specific error/message are you getting in the console window?

JMDPatterson commented 2 years ago

I'm receiving the following in the console (not using learning mode, just pressing F3)

2022-05-10 16_26_44-Select Stockpiler-v1 2b exe - Shortcut

PeteNotFound commented 2 years ago

My console looks exactly the same.

tehruttiger commented 2 years ago

Yeah, I'm going to pull all that out of a try loop so I can get a specific error. It's not giving us anything to go on there.

tehruttiger commented 2 years ago

Issue was a lowercase k in cv2.waitkey(0) which should have been cv2.waitKey(0). Gotta love it. Commented out and tested working.