JHue58 / ChatLearning

基于mirai-api-http,让bot学会你的群的说话方式
GNU Affero General Public License v3.0
316 stars 21 forks source link

更新到2.0后出现bug #17

Closed fatinghenji closed 2 years ago

fatinghenji commented 2 years ago

报错如下:

root@localhost:~/ChatLearning.Linux# python3 Chatmain.py
Traceback (most recent call last):
  File "Chatmain.py", line 11, in <module>
    import ChatAllfind
  File "/root/ChatLearning.Linux/ChatAllfind.py", line 7, in <module>
    from qcloud_cos import CosConfig, CosS3Client
ModuleNotFoundError: No module named 'qcloud_cos'
root@localhost:~/ChatLearning.Linux# pip install qcloud_cos
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting qcloud_cos
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/ec/ee/0f314f3e4d97c6b08193422e2436f5fc0af75523d2a7f29e587b73a2b65b/qcloud_cos-3.3.6.tar.gz (10 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [1 lines of output]
      Sorry, only python 2.6 or 2.7 is supported
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

Linux用户则使用python运行Chatmain.py脚本 (python版本需为3.5以上)是哪里出问题了呢?

JHue58 commented 2 years ago

有下载新的模块吗,指令我在新版本的release中有写

JHue58 commented 2 years ago

pip install -u cos-python-sdk-v5

fatinghenji commented 2 years ago

下次更新在包里面放个requirements.txt怎么样?然后就可以用pip install -r requirements.txt来配置环境了

JHue58 commented 2 years ago

可以,当有使用新的依赖的时候我会添加)

JHue58 commented 2 years ago

我直接加进最新的release吧)

fatinghenji commented 2 years ago

然后可以改一手readme