TISUnion / ChatBridge

boardcast chat between mc servers or even discord server
GNU Lesser General Public License v3.0
65 stars 39 forks source link

AttributeError: 'CLIServerConfig' object has no attribute 'update_from' #36

Closed ahkui closed 1 year ago

ahkui commented 1 year ago
image
JKGouZi commented 1 year ago

兄弟解决了吗

ahkui commented 1 year ago

沒解決,目前還是一樣

環境

root@2cc95f2c5e06:/data# python -V
Python 3.8.10
root@2cc95f2c5e06:/data# pip freeze
aiohttp==3.8.4
aiosignal==1.3.1
async-timeout==4.0.2
attrs==22.2.0
certifi==2022.12.7
charset-normalizer==3.1.0
colorama==0.4.6
colorlog==6.7.0
discord.py==2.2.2
frozenlist==1.3.3
google-trans-new==1.1.9
hjson==3.1.0
idna==3.4
mcdreforged==2.8.1
multidict==6.0.4
parse==1.19.0
prompt-toolkit==3.0.38
psutil==5.9.4
pycryptodome==3.17
requests==2.28.2
ruamel.yaml==0.17.21
ruamel.yaml.clib==0.2.7
typing-extensions==4.5.0
urllib3==1.26.15
wcwidth==0.2.6
yarl==1.8.2
root@2cc95f2c5e06:/data# uname -a
Linux 2cc95f2c5e06 5.15.0-60-generic #66-Ubuntu SMP Fri Jan 20 14:29:49 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

設定

{
    "aes_key": "chatbridge",
    "hostname": "0.0.0.0",
    "port": 80,
    "clients": [
        {
            "name": "魔法金屬",
            "password": "1.7.10"
        },
        {
            "name": "魔法金屬[測試服]",
            "password": "1.7.10"
        },
        {
            "name": "Discord - 阿貴FMS",
            "password": "1.7.10"
        },
        {
            "name": "Discord - 88888",
            "password": "1.7.10"
        }
    ],
    "show_chat": true,
    "log_chat": true
}
ahkui commented 1 year ago

image

看起來是 mcdreforged==2.8.1 太新了

ahkui commented 1 year ago

mcdreforged>=2.2.0,<2.8.0

限制版本不超過 2.8.0 就解決了

JKGouZi commented 1 year ago

我把python卸载 lib也删了重新安装就好了

ahkui commented 1 year ago

mcdreforged 只要裝 2.8.1 就噴了,上面提供的截圖是用新 docker container 進行測試,每一次都是新環境

image: itzg/minecraft-server:java8-multiarch

apt update -yqq
apt install -y python3-pip wget
wget https://github.com/TISUnion/ChatBridge/releases/download/v2.5.0/ChatBridge.pyz
pip install -r requirements.txt
python ChatBridge.pyz server

requirements.txt

mcdreforged>=2.2.0
pycryptodome
colorlog
discord.py>=2.0.0
google_trans_new
psutil
hjson
parse
Fallen-Breath commented 1 year ago

resolved in v2.5.1