查询记录默认生成的Python SDK有BUG
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
Research direction
Start by locating the generated SearchAppTableRecordRequest implementation and its request serialization path. Reproduce the Bitable record-search call against the linked endpoint using the default configuration, then verify that the request includes the empty JSON body described in the report and no longer returns error 9499.
Written by the indexing model from the issue text.
Description
使用默认配置,curl可查,官方默认生成的 request如下:
# 构造请求对象
request: SearchAppTableRecordRequest = SearchAppTableRecordRequest.builder() \
.app_token("xxxx") \
.table_id("xxxx") \
.user_id_type("open_id") \
.page_size(20) \
.build()
这个请求方法是会报错的 ,报错:
[Lark] [2025-03-01 08:35:07,658] [DEBUG] POST https://open.feishu.cn/open-apis/auth/v3/tenant_access_token/internal 200, headers: {"User-Agent": "oapi-sdk-python/v1.4.10"}, params: [], body: {"app_id": "cli_a73571c4bdf1d013", "app_secret": "QPlsr77IpEm3jVMaBk2M8cuekmGHLn7y"}
[Lark] [2025-03-01 08:35:08,050] [DEBUG] POST https://open.feishu.cn/open-apis/bitable/v1/apps/Xf77bqPDVa2O4QsHUVLcbKrvn94/tables/tblPSj6KCG6gvSM5/records/search 400, headers: {"User-Agent": "oapi-sdk-python/v1.4.10", "Authorization": "Bearer t-g104318lLGTBEBTPIXEZNNNYTG3BXJPRBRYWR4DO"}, params: [["page_size", "20"]], body: None
[Lark] [2025-03-01 08:35:08,050] [ERROR] client.bitable.v1.app_table_record.search failed, code: 9499, msg: Invalid request parameters. Please check and modify accordingly., log_id: 20250301083507830819CBB35124477343, resp:
{
"code": 9499,
"msg": "Invalid request parameters. Please check and modify accordingly.",
"error": {
"log_id": "20250301083507830819CBB35124477343",
"troubleshooter": "排查建议查看(Troubleshooting suggestions): https://open.feishu.cn/search?from=openapi&log_id=20250301083507830819CBB35124477343&code=9499&method_id=7301628054955556866"
}
}
经过研究,默认curl代码请求发送了空请求体{},但是官方SDK没有发。所以需要加上 " .request_body(SearchAppTableRecordRequestBody.builder().build()) \ " ,就正常了
这个API是我第一个尝试调用的,坑了我两天。
- Dominant language
- Python
- Stars
- 559
- Forks
- 102
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from larksuite/oapi-sdk-python
-
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
larksuite/oapi-sdk-python#163 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
larksuite/oapi-sdk-python#162 · 1 comment ·
-
Difficulty 1/5 Under an hour Newbie friendliness 94/100
larksuite/oapi-sdk-python#161 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
larksuite/oapi-sdk-python#160 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
larksuite/oapi-sdk-python#159 ·
All issues in larksuite/oapi-sdk-python
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
use-agent-os/agent-os#3314 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
BasedHardware/omi#15662 · 1 comment ·
-
documentation help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
AiursoftWeb/AnduinOS-2#19 ·