Starry-Wind / StarRailAssistant

崩坏:星穹铁道自动化 | 崩坏:星穹铁道自动锄大地 | 崩坏:星穹铁道锄大地 | 自动锄大地 | 基于模拟按键
GNU General Public License v3.0
2.81k stars 236 forks source link

[Bug] 更新资源文件出错 #292

Closed forchannot closed 1 year ago

forchannot commented 1 year ago

问题描述

更新资源文件出错

预期行为

正常更新

实际行为

更新报错无法更新

截图或录屏

image

自动锄大地脚本版本

main分支最新

星穹铁道区服

国服

日志

10:35:01 - DEBUG    | update_file.unzip:54 - 0/0/0 -  [资源文件更新]正在提取StarRailAssistant-map/temp/pc/warn.jpg
10:35:01 - DEBUG    | update_file.unzip:54 - 0/0/0 -  [资源文件更新]正在提取StarRailAssistant-map/temp/transfer.jpg
10:35:01 - DEBUG    | update_file.unzip:54 - 0/0/0 -  [资源文件更新]正在提取StarRailAssistant-map/temp_list.json
10:35:01 - DEBUG    | update_file.unzip:54 - 0/0/0 -  [资源文件更新]正在提取StarRailAssistant-map/version.json
10:35:02 - ERROR    | Honkai_Star_Rail.<module>:186 - 0/0/0 -  Traceback (most recent call last):
  File "D:\Download\github\StarRailAssistant\Honkai_Star_Rail.py", line 166, in <module>
    up_data()
  File "D:\Download\github\StarRailAssistant\Honkai_Star_Rail.py", line 154, in up_data
    update_file_main(**up_data[option])
  File "D:\Download\github\StarRailAssistant\utils\update_file.py", line 267, in update_file_main
    check_file_status = asyncio.run(update_file(url_proxy,raw_proxy,False,skip_verify,type,version,url_zip,unzip_path,keep_folder,keep_file,zip_path,name))
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\miniconda\envs\sr\Lib\asyncio\runners.py", line 190, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File "E:\miniconda\envs\sr\Lib\asyncio\runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\miniconda\envs\sr\Lib\asyncio\base_events.py", line 653, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "D:\Download\github\StarRailAssistant\utils\update_file.py", line 177, in update_file
    await move_file(os.path.join(tmp_dir, zip_path), unzip_path, [], keep_file)
  File "D:\Download\github\StarRailAssistant\utils\update_file.py", line 76, in move_file
    shutil.copy(item, dst_path)
  File "E:\miniconda\envs\sr\Lib\shutil.py", line 419, in copy
    copyfile(src, dst, follow_symlinks=follow_symlinks)
  File "E:\miniconda\envs\sr\Lib\shutil.py", line 258, in copyfile
    with open(dst, 'wb') as fdst:
         ^^^^^^^^^^^^^^^
PermissionError: [Errno 13] Permission denied: './temp\\adb/adb.exe'
forchannot commented 1 year ago

此外,现在每次打开地图都要打开三四次,而且还容易识别失败了,之前2.7test分支的时候至少能跑完,现在很容易中途就失败停止

Night-stars-1 commented 1 year ago

更新脚本时不要运行程序

forchannot commented 1 year ago

并没有运行程序,直接用的主程序https://github.com/Starry-Wind/StarRailAssistant/blob/main/Honkai_Star_Rail.py 选择的更新的