hgjazhgj / FGO-py

自动每周任务新登场! 全自动免配置跨平台开箱即用的Fate/Grand Order助手.启动脚本,上床睡觉,养肝护发,满加成圣诞了解一下?

Home Page:http://fgo-py.hgjazhgj.top/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

在Alas内无法正常启动

iceynano opened this issue · comments

commented

在提问之前...

  • 我已经搜索了现有的 issues 和 discussions
  • 我已经阅读了 readme 中除版本记录以外的所有内容
  • 我在提问题之前至少花费了 5 分钟来思考和准备
  • 这个问题出现在最新版的 FGO-py 上
  • 这个问题出现了至少3次
  • 我使用过旧版的 FGO-py 并且没有出现过这个问题

描述你的问题

启动路径

FGO-py的deploy目录下AzurLaneAutoScript子目录的绝对路径
你可以把这个子目录拷贝至其他位置方便分布式部署

该目录下检测launch可用性所使用的shutil.which,在win平台内仅支持带后缀名的文件检测,由于launch文件并没有后缀名,于是直接返回了None。

如何复现

  1. 前往 'Alas'
  2. 点击 '启动'
  3. 出现问题

预期行为

No response

相关 Logs

═══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
                                                         START                                                         
═══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
═══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
                                                         START                                                         
═══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
2023-06-13 02:29:27.525 | INFO | Start scheduler loop: FGO                                                             
2023-06-13 02:29:27.530 | INFO | [Server] cn                                                                           
2023-06-13 02:29:27.535 | INFO | Bind task {'Alas', 'Fpy'}                                                             
2023-06-13 02:29:27.537 | INFO | Bind task {'Fpy'}                                                                     
2023-06-13 02:29:27.539 | INFO | Pending tasks: ['FpyHeartbeat']                                                       
2023-06-13 02:29:27.540 | INFO | [Task] FpyHeartbeat (Enable, 2023-01-01 05:00:00)                                     
2023-06-13 02:29:27.542 | INFO | Bind task {'FpyHeartbeat', 'Fpy'}                                                     
2023-06-13 02:29:29.963 | INFO | Scheduler: Start task `FpyHeartbeat`                                                  
═══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
                                                     FPYHEARTBEAT                                                      
═══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
2023-06-13 02:29:29.973 | ERROR | AssertionError:                                                                      
┌───────────────────────────────────────── Traceback (most recent call last) ─────────────────────────────────────────┐
│                                                                                                                     │
│ D:\AzurLaneAutoScript\alas.py:68 in run                                                                             │
│                                                                                                                     │
│    65 │   def run(self, command):                                                                                   │
│    66 │   │   try:                                                                                                  │
│    67 │   │   │   self.device.screenshot()                                                                          │
│ >  68 │   │   │   self.__getattribute__(command)()                                                                  │
│    69 │   │   │   return True                                                                                       │
│    70 │   │   except TaskEnd:                                                                                       │
│    71 │   │   │   return True                                                                                       │
│                                                                                                                     │
│ ┌────────────────────────────────────── locals ──────────────────────────────────────┐                              │
│ │ command = 'fpy_heartbeat'                                                          │                              │
│ │       e = AssertionError()                                                         │                              │
│ │    self = <submodule.AlasFpyBridge.fpy.FgoAutoScript object at 0x000001BA2550A288> │                              │
│ └────────────────────────────────────────────────────────────────────────────────────┘                              │
│ D:\AzurLaneAutoScript\submodule\AlasFpyBridge\fpy.py:60 in fpy_heartbeat                                            │
│                                                                                                                     │
│    57 │   │   return app                                                                                            │
│    58 │                                                                                                             │
│    59 │   def fpy_heartbeat(self):                                                                                  │
│ >  60 │   │   assert self.app.run("ping")                                                                           │
│    61 │   │   hh, mm = self.config.FpyInterval_Interval.split(":")                                                  │
│    62 │   │   self.config.task_delay(minute=int(hh) * 60 + int(mm))                                                 │
│    63                                                                                                               │
│                                                                                                                     │
│ ┌──────────────────────────────────── locals ─────────────────────────────────────┐                                 │
│ │ self = <submodule.AlasFpyBridge.fpy.FgoAutoScript object at 0x000001BA2550A288> │                                 │
│ └─────────────────────────────────────────────────────────────────────────────────┘                                 │
│                                                                                                                     │
│ D:\AzurLaneAutoScript\toolkit\lib\site-packages\cached_property.py:36 in __get__                                    │
│                                                                                                                     │
│    33 │   │   if asyncio and asyncio.iscoroutinefunction(self.func):                                                │
│    34 │   │   │   return self._wrap_in_coroutine(obj)                                                               │
│    35 │   │                                                                                                         │
│ >  36 │   │   value = obj.__dict__[self.func.__name__] = self.func(obj)                                             │
│    37 │   │   return value                                                                                          │
│    38 │                                                                                                             │
│    39 │   def _wrap_in_coroutine(self, obj):                                                                        │
│                                                                                                                     │
│ ┌──────────────────────────────────── locals ─────────────────────────────────────┐                                 │
│ │  cls = <class 'submodule.AlasFpyBridge.fpy.FgoAutoScript'>                      │                                 │
│ │  obj = <submodule.AlasFpyBridge.fpy.FgoAutoScript object at 0x000001BA2550A288> │                                 │
│ │ self = <cached_property.cached_property object at 0x000001BA26933408>           │                                 │
│ └─────────────────────────────────────────────────────────────────────────────────┘                                 │
│                                                                                                                     │
│ D:\AzurLaneAutoScript\submodule\AlasFpyBridge\fpy.py:47 in app                                                      │
│                                                                                                                     │
│    44 │   │   app = FGOpy(                                                                                          │
│    45 │   │   │   self.config.FpyEmulator_LaunchPath,                                                               │
│    46 │   │   │   {                                                                                                 │
│ >  47 │   │   │   │   "Special Drop": "FpyLimit_SpecialDrop",                                                       │
│    48 │   │   │   },                                                                                                │
│    49 │   │   )                                                                                                     │
│    50 │   │   assert app.run("ping")                                                                                │
│                                                                                                                     │
│ ┌──────────────────────────────────── locals ─────────────────────────────────────┐                                 │
│ │ self = <submodule.AlasFpyBridge.fpy.FgoAutoScript object at 0x000001BA2550A288> │                                 │
│ └─────────────────────────────────────────────────────────────────────────────────┘                                 │
│                                                                                                                     │
│ D:\AzurLaneAutoScript\submodule\AlasFpyBridge\module\FGOpy.py:17 in __init__                                        │
│                                                                                                                     │
│   14 │   │   # Caution that a mutable object is used for default paprameter                                         │
│   15 │   │   assert os.path.isabs(path) and os.path.exists(path)                                                    │
│   16 │   │   launch = shutil.which("launch", path=path)                                                             │
│ > 17 │   │   assert launch                                                                                          │
│   18 │   │   # If you filled in `/usr/sbin` as the path, and there happened to be an                                │
│      executable named `launch`, and Alas had root privileges...                                                     │
│   19 │   │   halt = shutil.which("halt", path=path)                                                                 │
│   20 │   │   os.environ["PATH"] = os.pathsep.join([                                                                 │
│                                                                                                                     │
│ ┌─────────────────────────────────────── locals ────────────────────────────────────────┐                           │
│ │ __class__ = <class 'submodule.AlasFpyBridge.module.FGOpy.FGOpy'>                      │                           │
│ │   counter = {'Special Drop': 'FpyLimit_SpecialDrop'}                                  │                           │
│ │    launch = None                                                                      │                           │
│ │      path = 'D:\\AzurLaneAutoScript\\FGO'                                             │                           │
│ │      self = <submodule.AlasFpyBridge.module.FGOpy.FGOpy object at 0x000001BA27386B88> │                           │
│ └───────────────────────────────────────────────────────────────────────────────────────┘                           │
└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
AssertionError                                                                                                         
2023-06-13 02:29:30.179 | INFO | No provider specified, skip sending

截图

No response

还有别的吗?

No response

来点色图

001
憋笑.jpg

你还需要阅读FGO-py的文档

把启动文件改名为launch.bat