Code Monkey home page Code Monkey logo

Comments (3)

tingod avatar tingod commented on September 14, 2024 2

@blueset @Jim-Zenn 请参考:

原因分析:
/link/chat的时候,会遍历群里所有用户的信息。而很多群用户并非自己的好友,导致在进行merge caption或match caption操作的时候群用户old caption(tuple类型)为None,从而爆出exception。

解决方案:
修改efb_wechat_slave/wxpy/utils/puid_map.py中的match_captionsmerge_captions方法,加入old caption为None时的处理逻辑。代码如下。

efb_wechat_slave/wxpy/utils/puid_map.py

def match_captions(old, new):
    if new[0] and not old is None:
        for i in range(4):
            if old[i] and new[i] and old[i] != new[i]:
                return False
        return True

def merge_captions(old, new):
    if old is None:
        return new
    else:
        return tuple(new[i] or old[i] for i in range(4))

没有本地测试环境故未测试是否有衍生bug。

from efb-wechat-slave.

blueset avatar blueset commented on September 14, 2024 1

感谢 @tingod 提供的 Patch,已在 9e07070 应用该更改。

from efb-wechat-slave.

IPv6Walker avatar IPv6Walker commented on September 14, 2024

@tingod 亲测这种方法有效。今天也是换了不同的VPS测试,在第二次爬取列表的时候就会报错,一直显示处理中。修改代码之后就解决了。

from efb-wechat-slave.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.