我正在为类似 SQL 的行而苦苦挣扎,我只是不知道如何解决它。
query = "SELECT P_askbid_midprice1, Label1 FROM 'DCIX_OB' WHERE time >= '2018-02-16T09:00:00Z' and time <= '2018-02-16T16:00:00' "
上一行出现以下错误:
Traceback (most recent call last):
File "graph_influxdb.py", line 53, in <module>
read_data(length='5min')
File "graph_influxdb.py", line 29, in read_data
result = client.query(query)
File "/usr/local/lib/python3.6/dist-packages/influxdb/client.py", line 394, in query
expected_response_code=expected_response_code
File "/usr/local/lib/python3.6/dist-packages/influxdb/client.py", line 271, in request
raise InfluxDBClientError(response.content, response.status_code)
influxdb.exceptions.InfluxDBClientError: 400: {"error":"error parsing query: found DCIX_OB, expected identifier at line 1, char 39"}
我该如何解决这个问题?