Littlefean / cyber-life

以桌面小生态缸的方式实时展示电脑各个性能指标,同时还能像《疯狂水族馆》一样,维护小生态缸里的生态平衡
MIT License
31 stars 6 forks source link

wayland #14

Open zty012 opened 1 month ago

zty012 commented 1 month ago

不支持wayland

zty012 commented 1 month ago
(.venv) ➜  cyber-life git:(master) python3 main.py
Traceback (most recent call last):
  File "/home/zty/dev/cyber-life/main.py", line 18, in <module>
    from cyber_life.life.life_manager import LifeManager
  File "/home/zty/dev/cyber-life/cyber_life/life/life_manager.py", line 10, in <module>
    from cyber_life.life.ball import LifeBall
  File "/home/zty/dev/cyber-life/cyber_life/life/ball.py", line 8, in <module>
    from .life_mixin.organism_mixin import OrganismMixin
  File "/home/zty/dev/cyber-life/cyber_life/life/life_mixin/organism_mixin.py", line 3, in <module>
    from cyber_life.life.tank import LIFE_TANK
  File "/home/zty/dev/cyber-life/cyber_life/life/tank.py", line 318, in <module>
    LIFE_TANK = _LifeTank(TANK_SCREEN_WIDTH)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/zty/dev/cyber-life/cyber_life/tools/singleton.py", line 11, in __call__
    cls._instances[cls] = super(SingletonMeta, cls).__call__(*args, **kwargs)
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/zty/dev/cyber-life/cyber_life/life/tank.py", line 67, in __init__
    w, h = ImageGrab.grab().size
           ^^^^^^^^^^^^^^^^
  File "/home/zty/dev/cyber-life/.venv/lib/python3.12/site-packages/PIL/ImageGrab.py", line 70, in grab
    size, data = Image.core.grabscreen_x11(xdisplay)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
OSError: X get_image failed: error 8 (73, 0, 1264)