coolcatha
V2EX  ›  问与答

最近有用过 wechaty 的吗?这几天怎么一直有超时的错误呀

  •  
  •   coolcatha · Aug 29, 2021 · 1942 views
    This topic created in 1728 days ago, the information mentioned may be changed or developed.

    从昨天开始就一直有这个问题,我用的是 python-wechaty,docker 启动了 puppet 后,python 脚本连接出现下面的错误:

    2021-08-29 11:57:13,324 - HostiePuppet - INFO - There is no endpoint in cache, trying to fetch endpoint with token.
    2021-08-29 11:57:15,272 - HostiePuppet - INFO - starting the puppet ...
    2021-08-29 11:57:15,277 - Wechaty - ERROR - The network is not good, the bot will try to restart after 60 seconds.
    

    token 什么的是正确的,我在 https://api.chatie.io/v0/hosties/ 上能查看到,但是就是脚本连接不上。

    我看前几天更新了 docker,我尝试了之前的版本也是同样的提示,很头大啊!

    各位帅哥美女,有没有类似的情况的,或者能不能给个思路呢?

    6 replies    2021-11-04 00:24:44 +08:00
    hahahahahahahah
        1
    hahahahahahahah  
       Aug 29, 2021 via iPhone
    他们有个微信群,你可以问一下,而且这免费 token 不好用,容易掉线
    coolcatha
        2
    coolcatha  
    OP
       Aug 29, 2021
    @hahahahahahahah

    非常感谢,不是免费的 token 的问题。是因为最新版的 puppet service 需要 TLS,目前只有 ts 版本的 wechaty 才适配。我降到了 0.65 版本的解决了问题。

    相关: https://github.com/wechaty/wechaty-puppet-service/issues/160
    sumulige
        3
    sumulige  
       Sep 26, 2021 via iPhone
    @coolcatha 您好,我也是刚遇到这个问题,恢复了 docker 重新拉取以后运行错跟你一样。我想问一下你是怎么将版本降到 0.65 ,docker pull 我发现就一个版本 latest
    coolcatha
        4
    coolcatha  
    OP
       Sep 26, 2021
    @sumulige docker 的配置文件里面改一下版本就可以
    coolcatha
        5
    coolcatha  
    OP
       Sep 26, 2021
    ```
    docker run -ti \
    --name wechaty_puppet_service_token_gateway \
    --rm \
    -e WECHATY_LOG \
    -e WECHATY_PUPPET \
    -e WECHATY_PUPPET_PADLOCAL_TOKEN \
    -e WECHATY_PUPPET_SERVER_PORT \
    -e WECHATY_TOKEN \
    -p "$WECHATY_PUPPET_SERVER_PORT:$WECHATY_PUPPET_SERVER_PORT" \
    wechaty/wechaty:0.65
    ```


    @sumulige
    swordspoet
        6
    swordspoet  
       Nov 4, 2021 via iPhone
    问一下,使用 wechaty 会导致微信被封号吗?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3029 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 08:37 · PVG 16:37 · LAX 01:37 · JFK 04:37
    ♥ Do have faith in what you're doing.