binance-common: rest_api.send_request() / send_signed_request() raise TypeError: 'function' object is not subscriptable
評估
研究方向
錯誤的下標位於 clients/spot/src/binance_sdk_spot/rest_api/rest_api.py 的第 237 行和第 268 行附近,也就是呼叫 send_requestT 的位置。請檢查一般函式 binance_common.utils.send_request 的簽章,然後對 /api/v3/ping 執行 ping 以重現問題。當 send_request 和 send_signed_request 都能在不使用 [T] 的情況下正常運作,並且相同的修正已套用到全部 26 個 REST 客戶端時,即視為完成。
由索引模型根據 Issue 內容生成。
描述
Problem
Every generated client's RestAPI.send_request() and RestAPI.send_signed_request() return send_request[T](...) (e.g. clients/spot/src/binance_sdk_spot/rest_api/rest_api.py lines 237 and 268). binance_common.utils.send_request is a plain function, so the subscript raises before any request is sent. Both methods have failed this way since the modular clients were released.
Reproduction (binance-sdk-spot with binance-common 4.10.0)
from binance_sdk_spot.spot import Spot, ConfigurationRestAPI
client = Spot(config_rest_api=ConfigurationRestAPI(base_path="https://api.binance.com"))
client.rest_api.send_request("/api/v3/ping", "GET")
# TypeError: 'function' object is not subscriptable
send_signed_request("/api/v3/account", "GET") fails the same way.
Who is affected
Anyone calling an endpoint the SDK does not wrap yet through send_request / send_signed_request, on any of the 26 REST clients (grep -rln "send_request\[T\]" clients/*/src). Generated endpoint methods are not affected: they call send_request(...) without [T].
- 主要語言
- Python
- 星號
- 3k
- 分支
- 718
- 平均合併
- 8 分鐘
- 30 天內合併 PR
- 1
環境準備
這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
binance/binance-connector-python 的其他 Issue
-
難度 1/5 1 小時以內 新手友好度 85/100
-
USDⓈ-M exchangeInfo:请明确 POSITION_RISK_CONTROL / positionControlSide 的语义与枚举可能已有人在做 @Tyagiquamar 於 23 天前認領。 未關閉
難度 4/5 3-5 天 新手友好度 15/100
binance/binance-connector-python#575 · 6 則留言 ·
-
[Bug] Response models declare numeric fields as strict `str`, causing silent fallback of `.data()` to raw dict (simple-earn & staking)可能已有人在做 @Tyagiquamar 於 69 天前認領。 未關閉
難度 4/5 3-5 天 新手友好度 68/100
binance/binance-connector-python#553 · 2 則留言 ·
-
難度 5/5 一週以上 新手友好度 20/100
-
難度 5/5 一週以上 新手友好度 30/100
binance/binance-connector-python#464 · 1 則留言 · 5 個 reaction ·
查看 binance/binance-connector-python 的全部 Issue
相似的 Issue
-
Task select patterns with uppercase letters never match可能已有人在做 @manobhisriram 今天認領。 未關閉
難度 2/5 1-3 小時 新手友好度 76/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 76/100
維護者通常 1 天內回覆
-
app: scripts status: backlog type: housekeeping
難度 1/5 1-3 小時 新手友好度 88/100
netbox-community/netbox-scripts#239 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 72/100
developmentseed/titiler-cmr#341 ·
維護者通常 1 天內回覆
-
Card tables add "..." to every value in a DataFrame column when any value is longer than 30 characters可能已有人在做 @omkarbandikatte 今天認領。 未關閉
難度 2/5 1-3 小時 新手友好度 72/100
維護者通常 1 天內回覆