Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【企业微信】日历/日程 更新返回无id字段导致引起KeyError #742

Open
pppobear opened this issue Aug 24, 2022 · 1 comment
Labels

Comments

@pppobear
Copy link

问题描述 (Description)

【企业微信】客户端调用 日历/日程 更新接口,会因为HTTP响应无id字段导致引起KeyError

配置信息 (Environment/Version)

  • OS:Linux

  • Python:3.10

  • wechatpy:2.0.0a26

重现步骤 (Reproducing)

调用 企业微信客户端的 schedule.update 或 calendar.update 方法

报错栈

2022-08-24T03:18:41.222417319Z File "/usr/local/lib/python3.10/site-packages/wechatpy/work/client/api/calendar.py", line 65, in update
2022-08-24T03:18:41.222419103Z return self._post("oa/calendar/update", data=data, result_processor=op.itemgetter("cal_id"))
2022-08-24T03:18:41.222420855Z File "/usr/local/lib/python3.10/site-packages/wechatpy/client/api/base.py", line 18, in _post
2022-08-24T03:18:41.222422599Z return self._client.post(url, **kwargs)
2022-08-24T03:18:41.222424197Z File "/usr/local/lib/python3.10/site-packages/wechatpy/client/base.py", line 142, in post
2022-08-24T03:18:41.222426174Z return self._request(method="post", url_or_endpoint=url, **kwargs)
2022-08-24T03:18:41.222431709Z File "/usr/local/lib/python3.10/site-packages/wechatpy/client/base.py", line 90, in _request
2022-08-24T03:18:41.222433399Z return self._handle_result(res, method, url, result_processor, **kwargs)
2022-08-24T03:18:41.222435054Z File "/usr/local/lib/python3.10/site-packages/wechatpy/client/base.py", line 136, in _handle_result
2022-08-24T03:18:41.222436723Z return result if not result_processor else result_processor(result)
2022-08-24T03:18:41.222438452Z KeyError: 'cal_id'

@pppobear pppobear added the bug label Aug 24, 2022
@Athrun59
Copy link

Athrun59 commented Aug 24, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants