VeighNa量化社区
你的开源社区量化交易平台
Member
avatar
加入于:
帖子: 42
声望: 1

配置完influxdb后,下载数据时出现以下报错`Traceback (most recent call last):
File "C:\veighna_studio\lib\site-packages\vnpy_datamanager\ui\widget.py", line 620, in download
count: int = self.engine.download_bar_data(symbol, exchange, interval, start, self.output)
File "C:\veighna_studio\lib\site-packages\vnpy_datamanager\engine.py", line 215, in download_bar_data
self.database.save_bar_data(data)
File "C:\veighna_studio\lib\site-packages\vnpy_influxdb\influxdb_database.py", line 94, in save_bar_data
self.write_api.write(
File "C:\veighna_studio\lib\site-packages\influxdb_client\client\write_api.py", line 378, in write
results = list(map(write_payload, payloads.items()))
File "C:\veighna_studio\lib\site-packages\influxdb_client\client\write_api.py", line 376, in write_payload
return self._post_write(_async_req, bucket, org, final_string, payload[0])
File "C:\veighna_studio\lib\site-packages\influxdb_client\client\write_api.py", line 509, in _post_write
return self._write_service.post_write(org=org, bucket=bucket, body=body, precision=precision,
File "C:\veighna_studio\lib\site-packages\influxdb_client\service\write_service.py", line 60, in post_write
(data) = self.post_write_with_http_info(org, bucket, body, **kwargs) # noqa: E501
File "C:\veighna_studio\lib\site-packages\influxdb_client\service\write_service.py", line 90, in post_write_with_http_info
return self.api_client.call_api(
File "C:\veighna_studio\lib\site-packages\influxdb_client_sync\api_client.py", line 343, in call_api
return self.call_api(resource_path, method,
File "C:\veighna_studio\lib\site-packages\influxdb_client_sync\api_client.py", line 173, in
call_api
response_data = self.request(
File "C:\veighna_studio\lib\site-packages\influxdb_client_sync\api_client.py", line 388, in request
return self.rest_client.POST(url,
File "C:\veighna_studio\lib\site-packages\influxdb_client_sync\rest.py", line 311, in POST
return self.request("POST", url,
File "C:\veighna_studio\lib\site-packages\influxdb_client_sync\rest.py", line 261, 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-Influxdb-Build': 'OSS', 'X-Influxdb-Version': 'v2.7.0', 'X-Platform-Error-Code': 'unauthorized', 'Date': 'Sat, 10 Jun 2023 16:20:33 GMT', 'Content-Length': '55', 'Connection': 'close'})
HTTP response body: {"code":"unauthorized","message":"unauthorized access"}

`
是token没有配置的原因吗,该如何解决呢

Member
avatar
加入于:
帖子: 42
声望: 1

刚刚试了一下,user那里填组织的名称,password那里填token,就能下载录入数据了。
另外请教两个问题:
1.windows上,如何查看数据存储的物理位置呢,用户目录下好像没有找到对应的bucket。
2.Dbeaver尝试连接influxdb后,无法查看到里面下载的数据?
description

© 2015-2022 上海韦纳软件科技有限公司
备案服务号:沪ICP备18006526号

沪公网安备 31011502017034号

【用户协议】
【隐私政策】
【免责条款】