influxdata / influxdata/iot-api-python
The argument `authorization` in `create_authorization` needs to use a keyword
未关闭
还没有人认领这个 Issue。
- 主要语言
- Python
- 星标
- 28
- 派生
- 10
- PR 合并指标
- 30 天内没有已合并 PR
描述
In api/devices.py#162 the statement...
request = authorization_api.create_authorization(authorization)
should be
request = authorization_api.create_authorization(authorization=authorization)
This is related to.
- https://github.com/influxdata/influxdb-client-python/pull/682
- https://github.com/influxdata/influxdb-client-python/pull/680
- https://github.com/influxdata/docs-v2/pull/5701
Note that on clicking the Auth link in the flask UI, the tutorial application is now returning...
ApiException
influxdb_client.rest.ApiException: (400)
Reason: Bad Request
HTTP response headers: HTTPHeaderDict({'Content-Type': 'application/json; charset=utf-8', 'X-Influxdb-Build': 'OSS', 'X-Influxdb-Version': 'v2.7.11', 'X-Platform-Error-Code': 'invalid', 'Date': 'Wed, 04 Dec 2024 13:04:14 GMT', 'Content-Length': '163'})
HTTP response body: {
"code": "invalid",
"message": "invalid json structure: json: cannot unmarshal object into Go struct field postAuthorizationRequest.orgID of type platform.ID"
}
The example here is causing confusion for some users.
I tried to push a branch with this change to create a PR, however I do not have write permissions to this repository.
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从 api/devices.py#162 开始,检查 Flask 教程流程中的 create_authorization 调用。更新参数用法,使其符合 issue 要求的关键字形式,然后测试 Auth 链接并确认它不再返回所报告的 400 ApiException。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python
- 领域
- api, backend
- Issue 类型
- 缺陷
- 难度
- 1/5
- 预计耗时
- 1 小时以内
- 活跃度
- 停滞
- 描述清晰度
- 描述清楚
- 新手友好度
- 55/100