MuteApo / AzurLaneTachieHelper

MIT License
21 stars 6 forks source link

使用程式匯出psd時無論選擇誰都會出現Dependency not found #7

Closed Andy5066 closed 1 month ago

Andy5066 commented 1 month ago
  1. 202404時我還可以正常匯出psd
  2. 202407時,當我要回頭匯出5月活動的psd時開始報錯
    • 202312下載的程式匯出時報錯
    • V1.7.2打包後的程式匯出時報錯
    • main版本打包後的程式匯出時報錯

Snipaste_2024-07-20_00-13-09 Snipaste_2024-07-20_00-43-35

MuteApo commented 1 month ago

TL;DR: Latest dev builds can be found in Actions, you may also checkout branch 'dev' for (not so active) code updates. In May, Manjuu somehow upgrades Unity version in the game, along with a 'dependency' file to explicitly record painting dependencies. Earlier versions (even 1.7.3 if I could remember) are not compatible to such revision. Make sure 'dependency' file (actually /sdcard/Android/data/com.xxx.azurlane/files/AssetBundles/dependencies) is correctly placed in tool's root directory before open metadata. And with the latest dev version, just use the 'pull dependency' functionality integrated in 'File' menubar for your ease.

Andy5066 commented 1 month ago

TL;DR: Latest dev builds can be found in Actions, you may also checkout branch 'dev' for (not so active) code updates. In May, Manjuu somehow upgrades Unity version in the game, along with a 'dependency' file to explicitly record painting dependencies. Earlier versions (even 1.7.3 if I could remember) are not compatible to such revision. Make sure 'dependency' file (actually /sdcard/Android/data/com.xxx.azurlane/files/AssetBundles/dependencies) is correctly placed in tool's root directory before open metadata. And with the latest dev version, just use the 'pull dependency' functionality integrated in 'File' menubar for your ease.

按照此方法後可以正確讀取了,但是我又遇到新的問題 下圖以阿爾薩斯為例,讀取後有出現各圖層,但是當我要匯出psd時會報錯,此時雖然有psd產生,但是開啟後會是一片黑色

Snipaste_2024-07-20_02-27-15 Snipaste_2024-07-20_02-27-26

MuteApo commented 1 month ago

It's due to your corrupted python environment rather the tool, reinstall pytoshop via pip with --no-cache-dir option

Andy5066 commented 1 month ago

It's due to your corrupted python environment rather the tool, reinstall pytoshop via pip with --no-cache-dir option

我按順序執行以下指令

  1. pip freeze > all.txt
  2. pip uninstall -r all.txt -y
  3. 到工具根目錄底下pip install -r requirements.txt --no-cache-dir

但還是會得到相同的錯誤以及一片黑色的psd檔案

Andy5066 commented 1 month ago

It's due to your corrupted python environment rather the tool, reinstall pytoshop via pip with --no-cache-dir option

我按順序執行以下指令

1. pip freeze > all.txt

2. pip uninstall -r all.txt -y

3. 到工具根目錄底下pip install -r requirements.txt --no-cache-dir option

但還是會得到相同的錯誤以及一片黑色的psd檔案

我嘗試了很久,似乎找到正確方法了 找到安裝目錄\site-packages\pytoshop,打開codecs.py,然後

try:
    from . import packbits  # type: ignore
except ImportError:
    pass

改成

try:
    import pyximport
    pyximport.install()
    import packbits  # type: ignore
except ImportError:
    pass

對python不太了解,我猜似乎是因為pytoshop安裝後只有packbits.c和packbits.pyx,導致import packbits有問題,所以要先導入pyximport後才能正常執行

參考: https://github.com/mdboom/pytoshop/issues/9