View in #influxdb-v2 on Slack
@géraud_Bertrand: Hi,
I have a problem with my influx CLI in my internship. I need to create a database and insert data using a python script (for formatting data) with a process manage by supervisord. I am on a VM and i receive this error when i test my python script :
> Traceback (most recent call last):
> File “influx/influx2.py”, line 58, in <module>
> print(auth._authorizations_service.get_authorizations())
> File “/home/e4cop/.conda/envs/influxImport/lib/python3.6/site-packages/influxdb_client/service/authorizations_service.py”, line 155, in get_authorizations
> (data) = self.get_authorizations_with_http_info(****kwargs) # noqa: E501
> File “/home/e4cop/.conda/envs/influxImport/lib/python3.6/site-packages/influxdb_client/service/authorizations_service.py”, line 237, in get_authorizations_with_http_info
> collection_formats=collection_formats)
> File “/home/e4cop/.conda/envs/influxImport/lib/python3.6/site-packages/influxdb_client/api_client.py”, line 339, in call_api
> _preload_content, _request_timeout)
> File “/home/e4cop/.conda/envs/influxImport/lib/python3.6/site-packages/influxdb_client/api_client.py”, line 170, in __call_api
> _request_timeout=_request_timeout)
> File “/home/e4cop/.conda/envs/influxImport/lib/python3.6/site-packages/influxdb_client/api_client.py”, line 360, in request
> headers=headers)
> File “/home/e4cop/.conda/envs/influxImport/lib/python3.6/site-packages/influxdb_client/rest.py”, line 241, in GET
> query_params=query_params)
> File “/home/e4cop/.conda/envs/influxImport/lib/python3.6/site-packages/influxdb_client/rest.py”, line 231, in request
> raise ApiException(http_resp=r)
> influxdb_client.rest.ApiException: (401)
> Reason: Unauthorized
> HTTP response headers: HTTPHeaderDict({‘Content-Type’: ‘application/json; charset=utf-8’, ‘X-Platform-Error-Code’: ‘unauthorized’, ‘Date’: ‘Mon, 07 Jun 2021 07:13:23 GMT’, ‘Content-Length’: ‘55’})
> HTTP response body: {“code”:“unauthorized”,“message”:“unauthorized access”}
And inside influx CLI if i want to do a simple command to see authorization, bucket or organization. I do this command :
influx auth list
influx auth list -t XXXXXX
I only use the superuser token, I didn’t create another and i can’t now
Do someone know why or how i could resolve this problem ? ( I did think of recreating the setup but i didn’t see command to do it)