AzurLaneAutoScript icon indicating copy to clipboard operation
AzurLaneAutoScript copied to clipboard

默认军事委托出错

Open loy4dot opened this issue 10 months ago • 3 comments

在提问之前...

  • [X] 我已经搜索了现有的 issues
  • [X] 我在提问题之前至少花费了 5 分钟来思考和准备
  • [X] 我已经阅读了 Wiki 中的 常见问题(FAQ)
  • [X] 我正在使用最新版的 Alas

描述你的问题

没有紧急委托情况下,默认的委托设置运行报错

如何复现

No response

预期行为

No response

相关 Logs

ERROR    17:42:36.105 │ TypeError: 'int' object is not callable                    
         ╭────────────────── Traceback (most recent call last) ───────────────────╮
         │                                                                        │
         │ D:\GAME\AzurLaneAutoScript\alas.py:68 in run                           │
         │                                                                        │
         │    66 │   │   try:                                                     │
         │    67 │   │   │   self.device.screenshot()                             │
         │ ❱  68 │   │   │   self.__getattribute__(command)()                     │
         │    69 │   │   │   return True                                          │
         │    70 │   │   except TaskEnd:                                          │
         │                                                                        │
         │ ╭───────────────────────────── locals ─────────────────────────────╮   │
         │ │ command = 'commission'                                           │   │
         │ │       e = TypeError("'int' object is not callable")              │   │
         │ │    self = <alas.AzurLaneAutoScript object at 0x00000222F40A5F88> │   │
         │ ╰──────────────────────────────────────────────────────────────────╯   │
         │ D:\GAME\AzurLaneAutoScript\alas.py:189 in commission                   │
         │                                                                        │
         │   187 │   def commission(self):                                        │
         │   188 │   │   from module.commission.commission import RewardCommissio │
         │ ❱ 189 │   │   RewardCommission(config=self.config, device=self.device) │
         │   190 │                                                                │
         │   191 │   def tactical(self):                                          │
         │                                                                        │
         │ ╭────────────────────────────── locals ──────────────────────────────╮ │
         │ │ RewardCommission = <class                                          │ │
         │ │                    'module.commission.commission.RewardCommission… │ │
         │ │             self = <alas.AzurLaneAutoScript object at              │ │
         │ │                    0x00000222F40A5F88>                             │ │
         │ ╰────────────────────────────────────────────────────────────────────╯ │
         │                                                                        │
         │ D:\GAME\AzurLaneAutoScript\module\commission\commission.py:563 in run  │
         │                                                                        │
         │   561 │   │   # This is a game bug, the info_bar shows get ship, will  │
         │       again, until you click get_ship.                                 │
         │   562 │   │   self.handle_info_bar()                                   │
         │ ❱ 563 │   │   self.commission_start()                                  │
         │   564 │   │                                                            │
         │   565 │   │   # Scheduler                                              │
         │                                                                        │
         │ ╭────────────────────────────── locals ──────────────────────────────╮ │
         │ │ self = <module.commission.commission.RewardCommission object at    │ │
         │ │        0x00000222F4A41648>                                         │ │
         │ ╰────────────────────────────────────────────────────────────────────╯ │
         │                                                                        │
         │ D:\GAME\AzurLaneAutoScript\module\commission\commission.py:479 in      │
         │ commission_start                                                       │
         │                                                                        │
         │   477 │   │   │   │   self._commission_swipe_to_top()                  │
         │   478 │   │   │   │   self.handle_info_bar()                           │
         │ ❱ 479 │   │   │   │   if self._commission_find_and_start(comm, is_urge │
         │   480 │   │   │   │   │   comm.convert_to_running()                    │
         │   481 │   │   │   │   self._commission_mode_reset()                    │
         │                                                                        │
         │ ╭────────────────────────────── locals ──────────────────────────────╮ │
         │ │ comm = <module.commission.project.Commission object at             │ │
         │ │        0x000002231312C9C8>                                         │ │
         │ │ self = <module.commission.commission.RewardCommission object at    │ │
         │ │        0x00000222F4A41648>                                         │ │
         │ ╰────────────────────────────────────────────────────────────────────╯ │
         │                                                                        │
         │ D:\GAME\AzurLaneAutoScript\module\commission\commission.py:424 in      │
         │ _commission_find_and_start                                             │
         │                                                                        │
         │   422 │   │   │                                                        │
         │   423 │   │   │   for _ in range(15):                                  │
         │ ❱ 424 │   │   │   │   new = self.commission_detect(trial=2)            │
         │   425 │   │   │   │   if is_urgent:                                    │
         │   426 │   │   │   │   │   new.call('convert_to_night')  # Convert extr │
         │                                                                        │
         │ ╭────────────────────────────── locals ──────────────────────────────╮ │
         │ │         _ = 1                                                      │ │
         │ │      comm = <module.commission.project.Commission object at        │ │
         │ │             0x00000222F4A03D88>                                    │ │
         │ │   current = None                                                   │ │
         │ │    failed = True                                                   │ │
         │ │ is_urgent = False                                                  │ │
         │ │       new = <module.map.map_grids.SelectedGrids object at          │ │
         │ │             0x00000222F1308048>                                    │ │
         │ │  new_comm = <module.commission.project.Commission object at        │ │
         │ │             0x0000022313312308>                                    │ │
         │ │      self = <module.commission.commission.RewardCommission object  │ │
         │ │             at 0x00000222F4A41648>                                 │ │
         │ ╰────────────────────────────────────────────────────────────────────╯ │
         │                                                                        │
         │ D:\GAME\AzurLaneAutoScript\module\commission\commission.py:100 in      │
         │ commission_detect                                                      │
         │                                                                        │
         │    98 │   │   │   if area is not None:                                 │
         │    99 │   │   │   │   image = crop(image, area)                        │
         │ ❱ 100 │   │   │   commissions = self._commission_detect(image)         │
         │   101 │   │   │                                                        │
         │   102 │   │   │   if commissions.count >= 2 and commissions.select(val │
         │                                                                        │
         │ ╭────────────────────────────── locals ──────────────────────────────╮ │
         │ │                     _ = 0                                          │ │
         │ │                  area = None                                       │ │
         │ │           commissions = <module.map.map_grids.SelectedGrids object │ │
         │ │                         at 0x0000022313140D48>                     │ │
         │ │                 image = array([[[41, 37, 41],                      │ │
         │ │                         │   │   [41, 37, 41],                      │ │
         │ │                         │   │   [41, 37, 41],                      │ │
         │ │                         │   │   ...,                               │ │
         │ │                         │   │   [50, 45, 66],                      │ │
         │ │                         │   │   [50, 41, 66],                      │ │
         │ │                         │   │   [41, 41, 58]],                     │ │
         │ │                         │                                          │ │
         │ │                         │      [[41, 37, 41],                      │ │
         │ │                         │   │   [41, 37, 41],                      │ │
         │ │                         │   │   [41, 37, 41],                      │ │
         │ │                         │   │   ...,                               │ │
         │ │                         │   │   [50, 45, 66],                      │ │
         │ │                         │   │   [50, 41, 66],                      │ │
         │ │                         │   │   [41, 41, 58]],                     │ │
         │ │                         │                                          │ │
         │ │                         │      [[33, 37, 41],                      │ │
         │ │                         │   │   [33, 37, 41],                      │ │
         │ │                         │   │   [33, 37, 41],                      │ │
         │ │                         │   │   ...,                               │ │
         │ │                         │   │   [50, 45, 66],                      │ │
         │ │                         │   │   [50, 41, 66],                      │ │
         │ │                         │   │   [41, 41, 58]],                     │ │
         │ │                         │                                          │ │
         │ │                         │      ...,                                │ │
         │ │                         │                                          │ │
         │ │                         │      [[33, 37, 41],                      │ │
         │ │                         │   │   [33, 37, 41],                      │ │
         │ │                         │   │   [33, 37, 41],                      │ │
         │ │                         │   │   ...,                               │ │
         │ │                         │   │   [33, 37, 50],                      │ │
         │ │                         │   │   [33, 37, 50],                      │ │
         │ │                         │   │   [33, 37, 50]],                     │ │
         │ │                         │                                          │ │
         │ │                         │      [[41, 45, 58],                      │ │
         │ │                         │   │   [41, 45, 58],                      │ │
         │ │                         │   │   [41, 45, 58],                      │ │
         │ │                         │   │   ...,                               │ │
         │ │                         │   │   [33, 37, 50],                      │ │
         │ │                         │   │   [33, 37, 50],                      │ │
         │ │                         │   │   [33, 37, 50]],                     │ │
         │ │                         │                                          │ │
         │ │                         │      [[41, 49, 66],                      │ │
         │ │                         │   │   [41, 45, 58],                      │ │
         │ │                         │   │   [41, 49, 58],                      │ │
         │ │                         │   │   ...,                               │ │
         │ │                         │   │   [33, 37, 50],                      │ │
         │ │                         │   │   [33, 37, 50],                      │ │
         │ │                         │   │   [33, 37, 50]]], dtype=uint8)       │ │
         │ │                  self = <module.commission.commission.RewardCommi… │ │
         │ │                         object at 0x00000222F4A41648>              │ │
         │ │ skip_first_screenshot = False                                      │ │
         │ │                 trial = 2                                          │ │
         │ ╰────────────────────────────────────────────────────────────────────╯ │
         │                                                                        │
         │ D:\GAME\AzurLaneAutoScript\module\commission\commission.py:71 in       │
         │ _commission_detect                                                     │
         │                                                                        │
         │    69 │   │   commission = []                                          │
         │    70 │   │   for y in lines_detect(image):                            │
         │ ❱  71 │   │   │   comm = Commission(image, y=y, config=self.config)    │
         │    72 │   │   │   logger.attr('Commission', comm)                      │
         │    73 │   │   │   repeat = len([c for c in commission if c == comm])   │
         │                                                                        │
         │ ╭────────────────────────────── locals ──────────────────────────────╮ │
         │ │       comm = <module.commission.project.Commission object at       │ │
         │ │              0x000002231311A448>                                   │ │
         │ │ commission = [                                                     │ │
         │ │              │   <module.commission.project.Commission object at   │ │
         │ │              0x000002231311AE88>,                                  │ │
         │ │              │   <module.commission.project.Commission object at   │ │
         │ │              0x000002231311A448>                                   │ │
         │ │              ]                                                     │ │
         │ │      image = array([[[41, 37, 41],                                 │ │
         │ │              │   │   [41, 37, 41],                                 │ │
         │ │              │   │   [41, 37, 41],                                 │ │
         │ │              │   │   ...,                                          │ │
         │ │              │   │   [50, 45, 66],                                 │ │
         │ │              │   │   [50, 41, 66],                                 │ │
         │ │              │   │   [41, 41, 58]],                                │ │
         │ │              │                                                     │ │
         │ │              │      [[41, 37, 41],                                 │ │
         │ │              │   │   [41, 37, 41],                                 │ │
         │ │              │   │   [41, 37, 41],                                 │ │
         │ │              │   │   ...,                                          │ │
         │ │              │   │   [50, 45, 66],                                 │ │
         │ │              │   │   [50, 41, 66],                                 │ │
         │ │              │   │   [41, 41, 58]],                                │ │
         │ │              │                                                     │ │
         │ │              │      [[33, 37, 41],                                 │ │
         │ │              │   │   [33, 37, 41],                                 │ │
         │ │              │   │   [33, 37, 41],                                 │ │
         │ │              │   │   ...,                                          │ │
         │ │              │   │   [50, 45, 66],                                 │ │
         │ │              │   │   [50, 41, 66],                                 │ │
         │ │              │   │   [41, 41, 58]],                                │ │
         │ │              │                                                     │ │
         │ │              │      ...,                                           │ │
         │ │              │                                                     │ │
         │ │              │      [[33, 37, 41],                                 │ │
         │ │              │   │   [33, 37, 41],                                 │ │
         │ │              │   │   [33, 37, 41],                                 │ │
         │ │              │   │   ...,                                          │ │
         │ │              │   │   [33, 37, 50],                                 │ │
         │ │              │   │   [33, 37, 50],                                 │ │
         │ │              │   │   [33, 37, 50]],                                │ │
         │ │              │                                                     │ │
         │ │              │      [[41, 45, 58],                                 │ │
         │ │              │   │   [41, 45, 58],                                 │ │
         │ │              │   │   [41, 45, 58],                                 │ │
         │ │              │   │   ...,                                          │ │
         │ │              │   │   [33, 37, 50],                                 │ │
         │ │              │   │   [33, 37, 50],                                 │ │
         │ │              │   │   [33, 37, 50]],                                │ │
         │ │              │                                                     │ │
         │ │              │      [[41, 49, 66],                                 │ │
         │ │              │   │   [41, 45, 58],                                 │ │
         │ │              │   │   [41, 49, 58],                                 │ │
         │ │              │   │   ...,                                          │ │
         │ │              │   │   [33, 37, 50],                                 │ │
         │ │              │   │   [33, 37, 50],                                 │ │
         │ │              │   │   [33, 37, 50]]], dtype=uint8)                  │ │
         │ │     repeat = 0                                                     │ │
         │ │       self = <module.commission.commission.RewardCommission object │ │
         │ │              at 0x00000222F4A41648>                                │ │
         │ │          y = 526                                                   │ │
         │ ╰────────────────────────────────────────────────────────────────────╯ │
         │                                                                        │
         │ D:\GAME\AzurLaneAutoScript\module\commission\project.py:96 in __init__ │
         │                                                                        │
         │    94 │   │   self.image = image                                       │
         │    95 │   │   self.valid = True                                        │
         │ ❱  96 │   │   self.commission_parse()                                  │
         │    97 │   │                                                            │
         │    98 │   │   if not self.duration.total_seconds():                    │
         │                                                                        │
         │ ╭────────────────────────────── locals ──────────────────────────────╮ │
         │ │ config = <module.config.config.AzurLaneConfig object at            │ │
         │ │          0x00000222F5B3D088>                                       │ │
         │ │  image = array([[[41, 37, 41],                                     │ │
         │ │          │   │   [41, 37, 41],                                     │ │
         │ │          │   │   [41, 37, 41],                                     │ │
         │ │          │   │   ...,                                              │ │
         │ │          │   │   [50, 45, 66],                                     │ │
         │ │          │   │   [50, 41, 66],                                     │ │
         │ │          │   │   [41, 41, 58]],                                    │ │
         │ │          │                                                         │ │
         │ │          │      [[41, 37, 41],                                     │ │
         │ │          │   │   [41, 37, 41],                                     │ │
         │ │          │   │   [41, 37, 41],                                     │ │
         │ │          │   │   ...,                                              │ │
         │ │          │   │   [50, 45, 66],                                     │ │
         │ │          │   │   [50, 41, 66],                                     │ │
         │ │          │   │   [41, 41, 58]],                                    │ │
         │ │          │                                                         │ │
         │ │          │      [[33, 37, 41],                                     │ │
         │ │          │   │   [33, 37, 41],                                     │ │
         │ │          │   │   [33, 37, 41],                                     │ │
         │ │          │   │   ...,                                              │ │
         │ │          │   │   [50, 45, 66],                                     │ │
         │ │          │   │   [50, 41, 66],                                     │ │
         │ │          │   │   [41, 41, 58]],                                    │ │
         │ │          │                                                         │ │
         │ │          │      ...,                                               │ │
         │ │          │                                                         │ │
         │ │          │      [[33, 37, 41],                                     │ │
         │ │          │   │   [33, 37, 41],                                     │ │
         │ │          │   │   [33, 37, 41],                                     │ │
         │ │          │   │   ...,                                              │ │
         │ │          │   │   [33, 37, 50],                                     │ │
         │ │          │   │   [33, 37, 50],                                     │ │
         │ │          │   │   [33, 37, 50]],                                    │ │
         │ │          │                                                         │ │
         │ │          │      [[41, 45, 58],                                     │ │
         │ │          │   │   [41, 45, 58],                                     │ │
         │ │          │   │   [41, 45, 58],                                     │ │
         │ │          │   │   ...,                                              │ │
         │ │          │   │   [33, 37, 50],                                     │ │
         │ │          │   │   [33, 37, 50],                                     │ │
         │ │          │   │   [33, 37, 50]],                                    │ │
         │ │          │                                                         │ │
         │ │          │      [[41, 49, 66],                                     │ │
         │ │          │   │   [41, 45, 58],                                     │ │
         │ │          │   │   [41, 49, 58],                                     │ │
         │ │          │   │   ...,                                              │ │
         │ │          │   │   [33, 37, 50],                                     │ │
         │ │          │   │   [33, 37, 50],                                     │ │
         │ │          │   │   [33, 37, 50]]], dtype=uint8)                      │ │
         │ │   self = <module.commission.project.Commission object at           │ │
         │ │          0x0000022313134F08>                                       │ │
         │ │      y = 526                                                       │ │
         │ ╰────────────────────────────────────────────────────────────────────╯ │
         │                                                                        │
         │ D:\GAME\AzurLaneAutoScript\module\base\decorator.py:70 in wrapper      │
         │                                                                        │
         │    68 │   │   │   │   │   │   continue                                 │
         │    69 │   │   │   │   │                                                │
         │ ❱  70 │   │   │   │   │   return record['func'](self, *args, **kwargs) │
         │    71 │   │   │   │                                                    │
         │    72 │   │   │   │   logger.warning(f'No option fits for {name}, usin │
         │       func.')                                                          │
         │                                                                        │
         │ ╭────────────────────────────── locals ──────────────────────────────╮ │
         │ │   args = ()                                                        │ │
         │ │    cls = <class 'module.base.decorator.Config'>                    │ │
         │ │   flag = [True]                                                    │ │
         │ │   func = <function Commission.commission_parse at                  │ │
         │ │          0x00000222F4C431F8>                                       │ │
         │ │ kwargs = {}                                                        │ │
         │ │ logger = <Logger alas (INFO)>                                      │ │
         │ │   name = 'commission_parse'                                        │ │
         │ │ record = {                                                         │ │
         │ │          │   'options': {'SERVER': None},                          │ │
         │ │          │   'func': <function Commission.commission_parse at      │ │
         │ │          0x00000222F4C431F8>                                       │ │
         │ │          }                                                         │ │
         │ │   self = <module.commission.project.Commission object at           │ │
         │ │          0x0000022313134F08>                                       │ │
         │ ╰────────────────────────────────────────────────────────────────────╯ │
         │                                                                        │
         │ D:\GAME\AzurLaneAutoScript\module\commission\project.py:263 in         │
         │ commission_parse                                                       │
         │                                                                        │
         │   261 │   │   button = Button(area=area, color=(), button=area, name=' │
         │   262 │   │   ocr = Duration(button)                                   │
         │ ❱ 263 │   │   self.duration = ocr.ocr(self.image)                      │
         │   264 │   │                                                            │
         │   265 │   │   # Expire time                                            │
         │                                                                        │
         │ ╭────────────────────────────── locals ──────────────────────────────╮ │
         │ │   area = (478, 475, 578, 502)                                      │ │
         │ │ button = DURATION                                                  │ │
         │ │    ocr = <module.ocr.ocr.Duration object at 0x00000222F1334748>    │ │
         │ │   self = <module.commission.project.Commission object at           │ │
         │ │          0x0000022313134F08>                                       │ │
         │ ╰────────────────────────────────────────────────────────────────────╯ │
         │                                                                        │
         │ D:\GAME\AzurLaneAutoScript\module\ocr\ocr.py:229 in ocr                │
         │                                                                        │
         │   227 │   │   │   list, datetime.timedelta: timedelta object, or a lis │
         │   228 │   │   """                                                      │
         │ ❱ 229 │   │   result_list = super().ocr(image, direct_ocr=direct_ocr)  │
         │   230 │   │   if not isinstance(result_list, list):                    │
         │   231 │   │   │   result_list = [result_list]                          │
         │                                                                        │
         │ ╭────────────────────────────── locals ──────────────────────────────╮ │
         │ │  __class__ = <class 'module.ocr.ocr.Duration'>                     │ │
         │ │ direct_ocr = False                                                 │ │
         │ │      image = array([[[41, 37, 41],                                 │ │
         │ │              │   │   [41, 37, 41],                                 │ │
         │ │              │   │   [41, 37, 41],                                 │ │
         │ │              │   │   ...,                                          │ │
         │ │              │   │   [50, 45, 66],                                 │ │
         │ │              │   │   [50, 41, 66],                                 │ │
         │ │              │   │   [41, 41, 58]],                                │ │
         │ │              │                                                     │ │
         │ │              │      [[41, 37, 41],                                 │ │
         │ │              │   │   [41, 37, 41],                                 │ │
         │ │              │   │   [41, 37, 41],                                 │ │
         │ │              │   │   ...,                                          │ │
         │ │              │   │   [50, 45, 66],                                 │ │
         │ │              │   │   [50, 41, 66],                                 │ │
         │ │              │   │   [41, 41, 58]],                                │ │
         │ │              │                                                     │ │
         │ │              │      [[33, 37, 41],                                 │ │
         │ │              │   │   [33, 37, 41],                                 │ │
         │ │              │   │   [33, 37, 41],                                 │ │
         │ │              │   │   ...,                                          │ │
         │ │              │   │   [50, 45, 66],                                 │ │
         │ │              │   │   [50, 41, 66],                                 │ │
         │ │              │   │   [41, 41, 58]],                                │ │
         │ │              │                                                     │ │
         │ │              │      ...,                                           │ │
         │ │              │                                                     │ │
         │ │              │      [[33, 37, 41],                                 │ │
         │ │              │   │   [33, 37, 41],                                 │ │
         │ │              │   │   [33, 37, 41],                                 │ │
         │ │              │   │   ...,                                          │ │
         │ │              │   │   [33, 37, 50],                                 │ │
         │ │              │   │   [33, 37, 50],                                 │ │
         │ │              │   │   [33, 37, 50]],                                │ │
         │ │              │                                                     │ │
         │ │              │      [[41, 45, 58],                                 │ │
         │ │              │   │   [41, 45, 58],                                 │ │
         │ │              │   │   [41, 45, 58],                                 │ │
         │ │              │   │   ...,                                          │ │
         │ │              │   │   [33, 37, 50],                                 │ │
         │ │              │   │   [33, 37, 50],                                 │ │
         │ │              │   │   [33, 37, 50]],                                │ │
         │ │              │                                                     │ │
         │ │              │      [[41, 49, 66],                                 │ │
         │ │              │   │   [41, 45, 58],                                 │ │
         │ │              │   │   [41, 49, 58],                                 │ │
         │ │              │   │   ...,                                          │ │
         │ │              │   │   [33, 37, 50],                                 │ │
         │ │              │   │   [33, 37, 50],                                 │ │
         │ │              │   │   [33, 37, 50]]], dtype=uint8)                  │ │
         │ │       self = <module.ocr.ocr.Duration object at                    │ │
         │ │              0x00000222F1334748>                                   │ │
         │ ╰────────────────────────────────────────────────────────────────────╯ │
         │                                                                        │
         │ D:\GAME\AzurLaneAutoScript\module\ocr\ocr.py:99 in ocr                 │
         │                                                                        │
         │    97 │   │   # self.cnocr.debug(image_list)                           │
         │    98 │   │                                                            │
         │ ❱  99 │   │   result_list = self.cnocr.ocr_for_single_lines(image_list │
         │   100 │   │   result_list = [''.join(result) for result in result_list │
         │   101 │   │   result_list = [self.after_process(result) for result in  │
         │                                                                        │
         │ ╭────────────────────────────── locals ──────────────────────────────╮ │
         │ │ direct_ocr = False                                                 │ │
         │ │      image = array([[[41, 37, 41],                                 │ │
         │ │              │   │   [41, 37, 41],                                 │ │
         │ │              │   │   [41, 37, 41],                                 │ │
         │ │              │   │   ...,                                          │ │
         │ │              │   │   [50, 45, 66],                                 │ │
         │ │              │   │   [50, 41, 66],                                 │ │
         │ │              │   │   [41, 41, 58]],                                │ │
         │ │              │                                                     │ │
         │ │              │      [[41, 37, 41],                                 │ │
         │ │              │   │   [41, 37, 41],                                 │ │
         │ │              │   │   [41, 37, 41],                                 │ │
         │ │              │   │   ...,                                          │ │
         │ │              │   │   [50, 45, 66],                                 │ │
         │ │              │   │   [50, 41, 66],                                 │ │
         │ │              │   │   [41, 41, 58]],                                │ │
         │ │              │                                                     │ │
         │ │              │      [[33, 37, 41],                                 │ │
         │ │              │   │   [33, 37, 41],                                 │ │
         │ │              │   │   [33, 37, 41],                                 │ │
         │ │              │   │   ...,                                          │ │
         │ │              │   │   [50, 45, 66],                                 │ │
         │ │              │   │   [50, 41, 66],                                 │ │
         │ │              │   │   [41, 41, 58]],                                │ │
         │ │              │                                                     │ │
         │ │              │      ...,                                           │ │
         │ │              │                                                     │ │
         │ │              │      [[33, 37, 41],                                 │ │
         │ │              │   │   [33, 37, 41],                                 │ │
         │ │              │   │   [33, 37, 41],                                 │ │
         │ │              │   │   ...,                                          │ │
         │ │              │   │   [33, 37, 50],                                 │ │
         │ │              │   │   [33, 37, 50],                                 │ │
         │ │              │   │   [33, 37, 50]],                                │ │
         │ │              │                                                     │ │
         │ │              │      [[41, 45, 58],                                 │ │
         │ │              │   │   [41, 45, 58],                                 │ │
         │ │              │   │   [41, 45, 58],                                 │ │
         │ │              │   │   ...,                                          │ │
         │ │              │   │   [33, 37, 50],                                 │ │
         │ │              │   │   [33, 37, 50],                                 │ │
         │ │              │   │   [33, 37, 50]],                                │ │
         │ │              │                                                     │ │
         │ │              │      [[41, 49, 66],                                 │ │
         │ │              │   │   [41, 45, 58],                                 │ │
         │ │              │   │   [41, 49, 58],                                 │ │
         │ │              │   │   ...,                                          │ │
         │ │              │   │   [33, 37, 50],                                 │ │
         │ │              │   │   [33, 37, 50],                                 │ │
         │ │              │   │   [33, 37, 50]]], dtype=uint8)                  │ │
         │ │ image_list = [                                                     │ │
         │ │              │   array([[255, 255, 255, ..., 255, 255, 255],       │ │
         │ │              │      [255, 255, 255, ..., 255, 255, 255],           │ │
         │ │              │      [255, 255, 255, ..., 255, 255, 255],           │ │
         │ │              │      ...,                                           │ │
         │ │              │      [255, 255, 255, ..., 255, 255, 255],           │ │
         │ │              │      [255, 255, 255, ..., 255, 255, 255],           │ │
         │ │              │      [255, 255, 255, ..., 255, 255, 255]],          │ │
         │ │              dtype=uint8)                                          │ │
         │ │              ]                                                     │ │
         │ │       self = <module.ocr.ocr.Duration object at                    │ │
         │ │              0x00000222F1334748>                                   │ │
         │ │ start_time = 1712655756.103815                                     │ │
         │ ╰────────────────────────────────────────────────────────────────────╯ │
         │                                                                        │
         │ D:\GAME\AzurLaneAutoScript\module\ocr\al_ocr.py:105 in                 │
         │ ocr_for_single_lines                                                   │
         │                                                                        │
         │   103 │   │   │   self._model_loaded = True                            │
         │   104 │   │                                                            │
         │ ❱ 105 │   │   return super().ocr_for_single_lines(img_list)            │
         │   106 │                                                                │
         │   107 │   def set_cand_alphabet(self, cand_alphabet):                  │
         │                                                                        │
         │ ╭────────────────────────────── locals ──────────────────────────────╮ │
         │ │ __class__ = <class 'module.ocr.al_ocr.AlOcr'>                      │ │
         │ │  img_list = [                                                      │ │
         │ │             │   array([[255, 255, 255, ..., 255, 255, 255],        │ │
         │ │             │      [255, 255, 255, ..., 255, 255, 255],            │ │
         │ │             │      [255, 255, 255, ..., 255, 255, 255],            │ │
         │ │             │      ...,                                            │ │
         │ │             │      [255, 255, 255, ..., 255, 255, 255],            │ │
         │ │             │      [255, 255, 255, ..., 255, 255, 255],            │ │
         │ │             │      [255, 255, 255, ..., 255, 255, 255]],           │ │
         │ │             dtype=uint8)                                           │ │
         │ │             ]                                                      │ │
         │ │      self = <module.ocr.al_ocr.AlOcr object at 0x00000223132BBE08> │ │
         │ ╰────────────────────────────────────────────────────────────────────╯ │
         │                                                                        │
         │ D:\GAME\AzurLaneAutoScript\toolkit\lib\site-packages\cnocr\cn_ocr.py:2 │
         │ 90 in ocr_for_single_lines                                             │
         │                                                                        │
         │   288 │   │   img_list, img_widths = self._pad_arrays(img_list)        │
         │   289 │   │                                                            │
         │ ❱ 290 │   │   prob = self._predict(mx.nd.array(img_list))              │
         │   291 │   │   # [seq_len, batch_size, num_classes]                     │
         │   292 │   │   prob = np.reshape(prob, (-1, batch_size, prob.shape[1])) │
         │                                                                        │
         │ ╭────────────────────────────── locals ──────────────────────────────╮ │
         │ │ batch_size = 1                                                     │ │
         │ │   img_list = [                                                     │ │
         │ │              │   array([[[1., 1., 1., ..., 1., 1., 1.],            │ │
         │ │              │   │   [1., 1., 1., ..., 1., 1., 1.],                │ │
         │ │              │   │   [1., 1., 1., ..., 1., 1., 1.],                │ │
         │ │              │   │   ...,                                          │ │
         │ │              │   │   [1., 1., 1., ..., 1., 1., 1.],                │ │
         │ │              │   │   [1., 1., 1., ..., 1., 1., 1.],                │ │
         │ │              │   │   [1., 1., 1., ..., 1., 1., 1.]]],              │ │
         │ │              dtype=float32)                                        │ │
         │ │              ]                                                     │ │
         │ │ img_widths = [119]                                                 │ │
         │ │       self = <module.ocr.al_ocr.AlOcr object at                    │ │
         │ │              0x00000223132BBE08>                                   │ │
         │ ╰────────────────────────────────────────────────────────────────────╯ │
         │                                                                        │
         │ D:\GAME\AzurLaneAutoScript\toolkit\lib\site-packages\cnocr\cn_ocr.py:3 │
         │ 46 in _predict                                                         │
         │                                                                        │
         │   344 │                                                                │
         │   345 │   def _predict(self, sample):                                  │
         │ ❱ 346 │   │   prob = self._mod.predict(sample)                         │
         │   347 │   │   mx.nd.waitall()                                          │
         │   348 │   │   return prob.asnumpy()                                    │
         │                                                                        │
         │ ╭──────────────────────────── locals ─────────────────────────────╮    │
         │ │ sample =                                                        │    │
         │ │          [[[[1. 1. 1. ... 1. 1. 1.]                             │    │
         │ │             [1. 1. 1. ... 1. 1. 1.]                             │    │
         │ │             [1. 1. 1. ... 1. 1. 1.]                             │    │
         │ │             ...                                                 │    │
         │ │             [1. 1. 1. ... 1. 1. 1.]                             │    │
         │ │             [1. 1. 1. ... 1. 1. 1.]                             │    │
         │ │             [1. 1. 1. ... 1. 1. 1.]]]]                          │    │
         │ │          <NDArray 1x1x32x119 @cpu(0)>                           │    │
         │ │   self = <module.ocr.al_ocr.AlOcr object at 0x00000223132BBE08> │    │
         │ ╰─────────────────────────────────────────────────────────────────╯    │
         │                                                                        │
         │ D:\GAME\AzurLaneAutoScript\toolkit\lib\site-packages\mxnet\module\base │
         │ _module.py:370 in predict                                              │
         │                                                                        │
         │    368 │   │   │   if isinstance(eval_data, np.ndarray):               │
         │    369 │   │   │   │   eval_data = ndarray.array(eval_data)            │
         │ ❱  370 │   │   │   self.forward(DataBatch([eval_data]))                │
         │    371 │   │   │   return self.get_outputs()[0]                        │
         │    372                                                                 │
         │                                                                        │
         │ ╭────────────────────────────── locals ──────────────────────────────╮ │
         │ │ always_output_list = False                                         │ │
         │ │          eval_data =                                               │ │
         │ │                      [[[[1. 1. 1. ... 1. 1. 1.]                    │ │
         │ │                         [1. 1. 1. ... 1. 1. 1.]                    │ │
         │ │                         [1. 1. 1. ... 1. 1. 1.]                    │ │
         │ │                         ...                                        │ │
         │ │                         [1. 1. 1. ... 1. 1. 1.]                    │ │
         │ │                         [1. 1. 1. ... 1. 1. 1.]                    │ │
         │ │                         [1. 1. 1. ... 1. 1. 1.]]]]                 │ │
         │ │                      <NDArray 1x1x32x119 @cpu(0)>                  │ │
         │ │      merge_batches = True                                          │ │
         │ │          num_batch = None                                          │ │
         │ │              reset = True                                          │ │
         │ │               self = <mxnet.module.module.Module object at         │ │
         │ │                      0x00000223132CBF48>                           │ │
         │ │   sparse_row_id_fn = None                                          │ │
         │ ╰────────────────────────────────────────────────────────────────────╯ │
         │                                                                        │
         │ D:\GAME\AzurLaneAutoScript\toolkit\lib\site-packages\mxnet\module\modu │
         │ le.py:625 in forward                                                   │
         │                                                                        │
         │   623 │   │   │   │   new_lshape = None                                │
         │   624 │   │   │                                                        │
         │ ❱ 625 │   │   │   self.reshape(new_dshape, new_lshape)                 │
         │   626 │   │                                                            │
         │   627 │   │   self._exec_group.forward(data_batch, is_train)           │
         │                                                                        │
         │ ╭────────────────────────────── locals ──────────────────────────────╮ │
         │ │ curr_data_shapes = ((1, 1, 32, 42),)                               │ │
         │ │       data_batch = <mxnet.io.io.DataBatch object at                │ │
         │ │                    0x00000223133B2BC8>                             │ │
         │ │         is_train = None                                            │ │
         │ │  new_data_shapes = ((1, 1, 32, 119),)                              │ │
         │ │       new_dshape = [                                               │ │
         │ │                    │   DataDesc[data,(1, 1, 32, 119),<class        │ │
         │ │                    'numpy.float32'>,NCHW]                          │ │
         │ │                    ]                                               │ │
         │ │       new_lshape = None                                            │ │
         │ │             self = <mxnet.module.module.Module object at           │ │
         │ │                    0x00000223132CBF48>                             │ │
         │ ╰────────────────────────────────────────────────────────────────────╯ │
         │                                                                        │
         │ D:\GAME\AzurLaneAutoScript\toolkit\lib\site-packages\mxnet\module\modu │
         │ le.py:472 in reshape                                                   │
         │                                                                        │
         │   470 │   │   │   self.data_names, self.label_names, data_shapes, labe │
         │   471 │   │                                                            │
         │ ❱ 472 │   │   self._exec_group.reshape(self._data_shapes, self._label_ │
         │   473 │                                                                │
         │   474 │   def init_optimizer(self, kvstore='local', optimizer='sgd',   │
         │                                                                        │
         │ ╭────────────────────────────── locals ──────────────────────────────╮ │
         │ │  data_shapes = [                                                   │ │
         │ │                │   DataDesc[data,(1, 1, 32, 119),<class            │ │
         │ │                'numpy.float32'>,NCHW]                              │ │
         │ │                ]                                                   │ │
         │ │ label_shapes = None                                                │ │
         │ │         self = <mxnet.module.module.Module object at               │ │
         │ │                0x00000223132CBF48>                                 │ │
         │ ╰────────────────────────────────────────────────────────────────────╯ │
         │                                                                        │
         │ D:\GAME\AzurLaneAutoScript\toolkit\lib\site-packages\mxnet\module\exec │
         │ utor_group.py:397 in reshape                                           │
         │                                                                        │
         │   395 │   │   if self._default_execs is None:                          │
         │   396 │   │   │   self._default_execs = [i for i in self.execs]        │
         │ ❱ 397 │   │   self.bind_exec(data_shapes, label_shapes, reshape=True)  │
         │   398 │                                                                │
         │   399 │   def set_params(self, arg_params, aux_params, allow_extra=Fal │
         │                                                                        │
         │ ╭────────────────────────────── locals ──────────────────────────────╮ │
         │ │  data_shapes = [                                                   │ │
         │ │                │   DataDesc[data,(1, 1, 32, 119),<class            │ │
         │ │                'numpy.float32'>,NCHW]                              │ │
         │ │                ]                                                   │ │
         │ │ label_shapes = None                                                │ │
         │ │         self = <mxnet.module.executor_group.DataParallelExecutorG… │ │
         │ │                object at 0x00000223132D0088>                       │ │
         │ ╰────────────────────────────────────────────────────────────────────╯ │
         │                                                                        │
         │ D:\GAME\AzurLaneAutoScript\toolkit\lib\site-packages\mxnet\module\exec │
         │ utor_group.py:373 in bind_exec                                         │
         │                                                                        │
         │   371 │   │   │   if reshape:                                          │
         │   372 │   │   │   │   self.execs[i] = self._default_execs[i].reshape(  │
         │ ❱ 373 │   │   │   │   │   allow_up_sizing=True, **dict(data_shapes_i + │
         │   374 │   │   │   else:                                                │
         │   375 │   │   │   │   self.execs.append(self._bind_ith_exec(i, data_sh │
         │                                                                        │
         │ ╭────────────────────────────── locals ──────────────────────────────╮ │
         │ │    data_shapes = [                                                 │ │
         │ │                  │   DataDesc[data,(1, 1, 32, 119),<class          │ │
         │ │                  'numpy.float32'>,NCHW]                            │ │
         │ │                  ]                                                 │ │
         │ │  data_shapes_i = [                                                 │ │
         │ │                  │   DataDesc[data,(1, 1, 32, 119),<class          │ │
         │ │                  'numpy.float32'>,NCHW]                            │ │
         │ │                  ]                                                 │ │
         │ │              i = 0                                                 │ │
         │ │   label_shapes = None                                              │ │
         │ │ label_shapes_i = []                                                │ │
         │ │        reshape = True                                              │ │
         │ │           self = <mxnet.module.executor_group.DataParallelExecuto… │ │
         │ │                  object at 0x00000223132D0088>                     │ │
         │ │   shared_group = None                                              │ │
         │ ╰────────────────────────────────────────────────────────────────────╯ │
         │                                                                        │
         │ D:\GAME\AzurLaneAutoScript\toolkit\lib\site-packages\mxnet\executor.py │
         │ :461 in reshape                                                        │
         │                                                                        │
         │   459 │   │                                                            │
         │   460 │   │   arg_arrays = [_ndarray_cls(NDArrayHandle(in_arg_handles[ │
         │ ❱ 461 │   │   │   │   │     for i in range(num_in_args.value)]         │
         │   462 │   │   grad_arrays = [_ndarray_cls(NDArrayHandle(arg_grad_handl │
         │   463 │   │   │   │   │      if arg_grad_handles[i] is not None        │
         │                                                                        │
         │ ╭────────────────────────────── locals ──────────────────────────────╮ │
         │ │          allow_up_sizing = True                                    │ │
         │ │         arg_grad_handles = <ctypes.wintypes.LP_c_void_p object at  │ │
         │ │                            0x00000223131BF448>                     │ │
         │ │        aux_state_handles = <ctypes.wintypes.LP_c_void_p object at  │ │
         │ │                            0x00000223131BF6C8>                     │ │
         │ │          ctx_map_dev_ids = []                                      │ │
         │ │        ctx_map_dev_types = []                                      │ │
         │ │             ctx_map_keys = []                                      │ │
         │ │                   handle = c_void_p(2349664460992)                 │ │
         │ │           in_arg_handles = <ctypes.wintypes.LP_c_void_p object at  │ │
         │ │                            0x00000223131BF048>                     │ │
         │ │                        k = 'data'                                  │ │
         │ │                   kwargs = {'data': (1, 1, 32, 119)}               │ │
         │ │           num_aux_states = c_ulong(26)                             │ │
         │ │              num_in_args = c_ulong(51)                             │ │
         │ │          partial_shaping = False                                   │ │
         │ │  provided_arg_shape_data = [1, 1, 32, 119]                         │ │
         │ │   provided_arg_shape_idx = [0, 4]                                  │ │
         │ │ provided_arg_shape_names = ['data']                                │ │
         │ │                     self = <mxnet.executor.Executor object at      │ │
         │ │                            0x000002231331F1C8>                     │ │
         │ │            shared_handle = c_void_p(2347822404608)                 │ │
         │ │                        v = (1, 1, 32, 119)                         │ │
         │ ╰────────────────────────────────────────────────────────────────────╯ │
         │                                                                        │
         │ D:\GAME\AzurLaneAutoScript\toolkit\lib\site-packages\mxnet\executor.py │
         │ :461 in <listcomp>                                                     │
         │                                                                        │
         │   459 │   │                                                            │
         │   460 │   │   arg_arrays = [_ndarray_cls(NDArrayHandle(in_arg_handles[ │
         │ ❱ 461 │   │   │   │   │     for i in range(num_in_args.value)]         │
         │   462 │   │   grad_arrays = [_ndarray_cls(NDArrayHandle(arg_grad_handl │
         │   463 │   │   │   │   │      if arg_grad_handles[i] is not None        │
         │                                                                        │
         │ ╭────────────────────────────── locals ──────────────────────────────╮ │
         │ │             .0 = <range_iterator object at 0x0000022313317DB0>     │ │
         │ │              i = 40                                                │ │
         │ │ in_arg_handles = <ctypes.wintypes.LP_c_void_p object at            │ │
         │ │                  0x00000223131BF048>                               │ │
         │ ╰────────────────────────────────────────────────────────────────────╯ │
         │                                                                        │
         │ D:\GAME\AzurLaneAutoScript\toolkit\lib\site-packages\mxnet\ndarray\spa │
         │ rse.py:1182 in _ndarray_cls                                            │
         │                                                                        │
         │   1180 def _ndarray_cls(handle, writable=True, stype=_STORAGE_TYPE_UND │
         │   1181 │   if stype == _STORAGE_TYPE_UNDEFINED:                        │
         │ ❱ 1182 │   │   stype = _storage_type(handle)                           │
         │   1183 │   if stype == _STORAGE_TYPE_DEFAULT:                          │
         │   1184 │   │   return NDArray(handle, writable=writable)               │
         │                                                                        │
         │ ╭────────────── locals ──────────────╮                                 │
         │ │   handle = c_void_p(2349656112544) │                                 │
         │ │    stype = -1                      │                                 │
         │ │ writable = True                    │                                 │
         │ ╰────────────────────────────────────╯                                 │
         │                                                                        │
         │ D:\GAME\AzurLaneAutoScript\toolkit\lib\site-packages\mxnet\ndarray\nda │
         │ rray.py:205 in _storage_type                                           │
         │                                                                        │
         │    203 def _storage_type(handle):                                      │
         │    204 │   storage_type = ctypes.c_int(0)                              │
         │ ❱  205 │   check_call(_LIB.MXNDArrayGetStorageType(handle, ctypes.byre │
         │    206 │   return storage_type.value                                   │
         │    207                                                                 │
         │                                                                        │
         │ ╭──────────────── locals ────────────────╮                             │
         │ │       handle = c_void_p(2349656112544) │                             │
         │ │ storage_type = c_long(0)               │                             │
         │ ╰────────────────────────────────────────╯                             │
         ╰────────────────────────────────────────────────────────────────────────╯
         TypeError: 'int' object is not callable

截图

{CEF1DFD2-E351-4fd0-BCF9-67873083C231} {97A96140-2698-4dae-BEC2-337B3CF55D9B}

还有别的吗?

No response

loy4dot avatar Apr 09 '24 10:04 loy4dot

log.txt

loy4dot avatar Apr 09 '24 10:04 loy4dot

是星界云吗?我今天也出现了类似的错误,点委托的时候会点到放大立绘上

qyyxxx407 avatar Apr 16 '24 02:04 qyyxxx407

不是,单纯的不接委托报错

loy4dot avatar Apr 18 '24 03:04 loy4dot