influxdata / influxdata/iot-api-python
The argument `authorization` in `create_authorization` needs to use a keyword
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Python
- Sterne
- 28
- Forks
- 10
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
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.
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne bei api/devices.py#162 und untersuche den Aufruf von create_authorization im Flask-Tutorial-Ablauf. Aktualisiere die Verwendung der Argumente, sodass sie der im Issue angeforderten Form mit Schlüsselwortargumenten entspricht, teste anschließend den Auth-Link und bestätige, dass er nicht mehr die gemeldete 400 ApiException zurückgibt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python
- Bereich
- api, backend
- Issue-Typ
- Bug
- Schwierigkeit
- 1/5
- Geschätzter Aufwand
- Unter einer Stunde
- Aktivitätsstatus
- Veraltet
- Klarheit
- Klar beschrieben
- Anfängerfreundlichkeit
- 55/100