Traceback (most recent call last):
File "C:\Software\March7thAssistant\build.py", line 3, in
from tasks.weekly.universe import Universe
File "C:\Software\March7thAssistant\tasks\weekly\universe.py", line 5, in
from tasks.base.base import Base
File "C:\Software\March7thAssistant\tasks\base\base.py", line 3, in
from module.notification import notif
File "C:\Software\March7thAssistant\module\notification__init__.py", line 3, in
from module.notification.notification import Notification
File "C:\Software\March7thAssistant\module\notification\notification.py", line 9, in
class Notification(metaclass=SingletonMeta):
File "C:\Software\March7thAssistant\module\notification\notification.py", line 34, in Notification
def _process_image(self, image: Optional[io.BytesIO | str | Image.Image]) -> Optional[io.BytesIO]:
TypeError: unsupported operand type(s) for |: 'type' and 'type'
请确保您已阅读以上注意事项,并勾选下方的确认框。
March7thAssistant 版本 (或 Commit Id)
08c61ae (2.2.0.3) Latest
重现步骤
使用python运行程序
期望的结果是什么?
程序正常启动
实际的结果是什么?
Traceback (most recent call last): File "C:\Software\March7thAssistant\build.py", line 3, in
from tasks.weekly.universe import Universe
File "C:\Software\March7thAssistant\tasks\weekly\universe.py", line 5, in
from tasks.base.base import Base
File "C:\Software\March7thAssistant\tasks\base\base.py", line 3, in
from module.notification import notif
File "C:\Software\March7thAssistant\module\notification__init__.py", line 3, in
from module.notification.notification import Notification
File "C:\Software\March7thAssistant\module\notification\notification.py", line 9, in
class Notification(metaclass=SingletonMeta):
File "C:\Software\March7thAssistant\module\notification\notification.py", line 34, in Notification
def _process_image(self, image: Optional[io.BytesIO | str | Image.Image]) -> Optional[io.BytesIO]:
TypeError: unsupported operand type(s) for |: 'type' and 'type'
日志记录
No response
补充说明(可选)
据查证,此问题是python 3.10版本新加入的功能所导致,如果在其以下版本运行会报错。建议兼容一下