ChaozhongLiu / DyberPet_GenshinImpact

Genshin Impact Desktop Cyber Pet built with DyberPet

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Mac 报错 IndexError

RexWzh opened this issue · comments

使用 Python 运行报错如下,环境按指示安装的。苹果 M2 ,不知道有没关联,麻烦您看下

❯ conda activate Dyber_pyside
❯ python run_DyberPet.py
qt.qpa.fonts: Populating font family aliases took 306 ms. Replace uses of missing font family "黑体" with one that exists to avoid this cost. 
start running pet Kitty
Traceback (most recent call last):
  File "/Users/wangzhihong/workspace/QQPet/DyberPet/run_DyberPet.py", line 157, in <module>
    app = DyberPetApp(sys.argv)
  File "/Users/wangzhihong/workspace/QQPet/DyberPet/run_DyberPet.py", line 82, in __init__
    self.conp = ControlMainWindow()
  File "/Users/wangzhihong/workspace/QQPet/DyberPet/DyberPet/DyberSettings/DyberControlPanel.py", line 46, in __init__
    self.itemCardInterface = ItemInterface(sizeHintDyber=(minWidth, minHeight), parent=self)
  File "/Users/wangzhihong/workspace/QQPet/DyberPet/DyberPet/DyberSettings/ItemCardUI.py", line 71, in __init__
    self.__initCardLayout()
  File "/Users/wangzhihong/workspace/QQPet/DyberPet/DyberPet/DyberSettings/ItemCardUI.py", line 109, in __initCardLayout
    card = ItemCard(i, itemFolder=itemFolder) #, parent=self.CharCardGroup)
  File "/Users/wangzhihong/workspace/QQPet/DyberPet/DyberPet/DyberSettings/custom_utils.py", line 1310, in __init__
    self.card = ItemCardWidget(cardIndex, itemFolder=itemFolder, parent=self)
  File "/Users/wangzhihong/workspace/QQPet/DyberPet/DyberPet/DyberSettings/custom_utils.py", line 1383, in __init__
    self.__init_InfoCard()
  File "/Users/wangzhihong/workspace/QQPet/DyberPet/DyberPet/DyberSettings/custom_utils.py", line 1533, in __init_InfoCard
    iconPath = glob.glob(os.path.join(basedir, 'res/icons', link+".*"))[0]
IndexError: list index out of range
QThread: Destroyed while thread is still running
[1]    23317 abort      python run_DyberPet.py

hello! 是不是应该放到另一个 Repo 去?
这个问题很奇怪,我也用了MacBook M1做测试,没有出现。
但我可以把代码改掉来避免问题,今天就会改掉。谢谢你的反馈

找到问题了,是一个 icon 文件命名错误,同步到GitHub的时候漏掉了。
麻烦你同步一下 DyberPet 最新的 Repo 看一看是否得到解决