dongweiming / wechat-admin

Wechat Management System
https://dongweiming.github.io/wechat-admin/
GNU General Public License v3.0
1.75k stars 421 forks source link

很长时间拉不下微信用户数据 #39

Closed dockersky closed 7 years ago

dockersky commented 7 years ago

在更新微信群组是报错: [2017-08-29 16:23:27,812: INFO/ForkPoolWorker-2] <Bot: 布道>: updating groups [2017-08-29 16:23:32,250: ERROR/ForkPoolWorker-2] Task wechat.tasks.update_group[7b964b48-9ee4-4757-aac1-4c309db96921] raised unexpected: TypeError("object of type 'NoneType' has no len()",) Traceback (most recent call last): File "/usr/local/python35/lib/python3.5/site-packages/celery/app/trace.py", line 367, in trace_task R = retval = fun(*args, *kwargs) File "/usr/local/python35/lib/python3.5/site-packages/celery/app/trace.py", line 622, in __protected_call__ return self.run(args, **kwargs) File "/root/wechat-admin/wechat/tasks.py", line 169, in update_group _update_group(bot, update=update) File "/root/wechat-admin/wechat/tasks.py", line 75, in _update_group for field in USER_FIELD}) File "/root/wechat-admin/models/mixin.py", line 9, in create obj = session.query(cls).get(kw['id']) File "/usr/local/python35/lib/python3.5/site-packages/sqlalchemy/orm/query.py", line 864, in get return self._get_impl(ident, loading.load_on_ident) File "/usr/local/python35/lib/python3.5/site-packages/sqlalchemy/orm/query.py", line 875, in _get_impl if len(ident) != len(mapper.primary_key): TypeError: object of type 'NoneType' has no len()

dongweiming commented 7 years ago

应该是你的微信列表里面某个人的puid是None造成的 我可以异常处理一下

dockersky commented 7 years ago

help和chatter的详细用法能介绍了吗?

dockersky commented 7 years ago

另外一个问题是,目前20多个群,但目前只读取和更新了10个。不知道这个是在哪里做限制了。