Skip to content

Commit

Permalink
diy 更新
Browse files Browse the repository at this point in the history
  • Loading branch information
Shawnsdaddy committed Nov 5, 2023
1 parent 9fcfe8d commit 406ea9f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 28 deletions.
21 changes: 0 additions & 21 deletions arknights_mower/utils/paddleocr.py

This file was deleted.

11 changes: 4 additions & 7 deletions diy.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,9 @@
from arknights_mower.utils.device import Device
from arknights_mower.utils.email import task_template
from arknights_mower.utils.log import logger, init_fhlr
from arknights_mower.utils import config
from arknights_mower.utils.logic_expression import LogicExpression
from arknights_mower.utils import config, rapidocr
from arknights_mower.utils.simulator import restart_simulator
from arknights_mower.utils.plan import Plan, PlanConfig, Room
import arknights_mower.utils.paddleocr

# 下面不能删除
from arknights_mower.utils.operators import Operators, Operator, Dormitory
from arknights_mower.utils.scheduler_task import SchedulerTask,TaskTypes
Expand Down Expand Up @@ -380,7 +377,7 @@ def simulate():
continue
base_scheduler.run()
reconnect_tries = 0
except ConnectionError or ConnectionAbortedError or AttributeError as e:
except (ConnectionError, ConnectionAbortedError, AttributeError) as e:
reconnect_tries += 1
if reconnect_tries < reconnect_max_tries:
logger.warning(f'连接端口断开....正在重连....')
Expand All @@ -389,7 +386,7 @@ def simulate():
try:
base_scheduler = inialize([], base_scheduler)
break
except RuntimeError or ConnectionError or ConnectionAbortedError as ce:
except (ConnectionError, ConnectionAbortedError, AttributeError) as ce:
logger.error(ce)
restart_simulator(simulator)
continue
Expand All @@ -411,5 +408,5 @@ def simulate():
# debuglog()
atexit.register(save_state)
savelog()
arknights_mower.utils.paddleocr.initialize_ocr()
rapidocr.initialize_ocr()
simulate()

0 comments on commit 406ea9f

Please sign in to comment.