我在Google和虹吸0.9中使用了以下代码:
from siphon.simplewebservice import acis
import json
params = {"sid":"KPIH","elems":"maxt,mint,avgt,pcpn,snow,snwd"}
ds = acis.acis_request("StnData", params)由此产生的错误:
JSONDecodeError: Expecting value: line 1 column 1 (char 0)
During handling of the above exception, another exception occurred:
AcisApiException Traceback (most recent call last)
/usr/local/lib/python3.7/dist-packages/siphon/simplewebservice/acis.py in acis_request(method, params)
60 raise AcisApiException('Bad URL. Check your ACIS connection method string.')
61 except ValueError:
---> 62 raise AcisApiException('No data returned! The ACIS parameter dictionary'
63 'may be incorrectly formatted')
64
AcisApiException: No data returned! The ACIS parameter dictionarymay be incorrectly formatted使用木星实验室也导致了同样的错误。
发布于 2022-11-22 11:03:19
通过将开始日期和结束日期添加到查询中,修正了该问题。
params = {"sid":"KPIH","elems":"maxt,mint,avgt,pcpn,snow,snwd","sdate":"por","edate":"por"}https://stackoverflow.com/questions/74530062
复制相似问题