will7200 / Yugioh-bot

Bot for Yugioh Duel Links via Nox and Steam
MIT License
58 stars 9 forks source link

Error in auto duel #71

Open mikeyyy10 opened 6 years ago

mikeyyy10 commented 6 years ago

Even though I dont know programming, I managed to install the bot according to the guide. After opening duel links in Nox, I type the command, a npc is selected but it doesnt click on Auto duel. I've changed the resolution to mobile 480x800. This is my log:

$ python main.py bot -s C:\Users\▒▒▒▒▒▒▒\AppData\Local\Programs\Python\Python36-32\lib\site-packages\h5py__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from float to np.floating is deprecated. In future, it will be treated as np.float64 == np.dtype(float).type. from ._conv import register_converters as _register_converters 2018-06-22 00:44:44 - INFO - bot - APScheduler failed to schedule run, forcing run now 2018-06-22 00:44:44 - DEBUG - bot - Value run_now modified 2018-06-22 00:44:44 - DEBUG - bot - Value stop modified 2018-06-22 00:44:44 - INFO - apscheduler.scheduler - Scheduler started 2018-06-22 00:44:44 - DEBUG - bot - Value next_run_at modified to 2018-06-22 00:44:45.227177 2018-06-22 00:44:44 - INFO - apscheduler.scheduler - Added job "DuelLinkRunTime.in_main" to job store "default" 2018-06-22 00:44:44 - INFO - bot - Next run at 2018-06-22T00:44:45.227177 2018-06-22 00:44:45 - INFO - apscheduler.executors.default - Running job "DuelLinkRunTime.in_main (trigger: date[2018-06-22 00:44:45 EEST], next run at: 2018-06-22 00:44:45 EEST)" (scheduled at 2018-06-22 00:44:45.227177+03:00) 2018-06-22 00:44:45 - INFO - apscheduler.scheduler - Removed job cron_main_at_2018-06-22T00:44:45.227177 2018-06-22 00:44:45 - DEBUG - bot - Value last_run_at modified to 2018-06-22 00:44:45.229157 2018-06-22 00:44:45 - INFO - bot.provider.Nox - Checking for Start Screen 2018-06-22 00:44:45 - INFO - bot.provider.Nox - Waiting for DuelLinks Landing Page 2018-06-22 00:44:49 - DEBUG - bot.provider.Nox - LOOKING FOR BACK BUTTON, HIGH CORRERLATION 2018-06-22 00:44:50 - INFO - bot - starting auto play through 2018-06-22 00:44:50 - INFO - bot.provider.Nox - starting auto run through 2018-06-22 00:44:50 - DEBUG - bot.provider.Nox - Run through 1 2018-06-22 00:44:50 - DEBUG - bot.provider.Nox - LOOKING FOR BACK BUTTON, HIGH CORRERLATION 2018-06-22 00:44:55 - DEBUG - bot.provider.Nox - LOOKING FOR BACK BUTTON, HIGH CORRERLATION 2018-06-22 00:44:56 - DEBUG - bot.provider.Nox - Tapping at location (330,528) 2018-06-22 00:45:00 - DEBUG - bot.provider.Nox - Tapping at location (150,400) 2018-06-22 00:45:03 - INFO - bot.provider.Nox - Verifying battle 2018-06-22 00:45:04 - DEBUG - bot - <class 'FileNotFoundError'> duel_links_runtime.py 438 2018-06-22 00:45:04 - DEBUG - bot - Traceback (most recent call last): File "C:\Users\▒▒▒▒▒▒▒\Yugioh-bot\bot\duel_links_runtime.py", line 438, in in_main self.determine_playthrough(provider) File "C:\Users\▒▒▒▒▒▒▒\Yugioh-bot\bot\duel_links_runtime.py", line 387, in determine_playthrough provider.auto() File "C:\Users\▒▒▒▒▒▒▒\Yugioh-bot\bot\providers\provider.py", line 60, in auto raise e File "C:\Users\▒▒▒▒▒▒▒\Yugioh-bot\bot\providers\provider.py", line 57, in auto self.scan() File "C:\Users\▒▒▒▒▒▒▒\Yugioh-bot\bot\providers\nox\nox.py", line 289, in scan battle, version = self.verify_battle() File "C:\Users\▒▒▒▒▒▒▒\Yugioh-bot\bot\providers\provider.py", line 175, in verify_battle word = self.img_to_string(img, alpha_numeric).lower() File "C:\Users\▒▒▒▒▒▒▒\Yugioh-bot\bot\providers\provider.py", line 243, in img_to_string with open("tmp\ocr.txt") as f: FileNotFoundError: [Errno 2] No such file or directory: 'tmp\ocr.txt'

2018-06-22 00:45:04 - INFO - apscheduler.executors.default - Job "DuelLinkRunTime.in_main (trigger: date[2018-06-22 00:44:45 EEST], next run at: 2018-06-22 00:44:45 EEST)" executed successfully

EV99 commented 6 years ago

I get the same error running the bot through Steam.

unal-dana commented 5 years ago

I get this error as well any Idea for solution ?

unal-dana commented 5 years ago

I solved this issue changing tmp\ocr.png to txt file