Closed 1553767977 closed 11 months ago
我也遇到这个问题了,而且无论免费还是个人,都会报这个ValidationError。我怀疑是天气API的接口变了
我这个是啥问题?
我也遇到这个问题了,而且无论免费还是个人,都会报这个ValidationError。我怀疑是天气API的接口变了
相同的问题
我这个是啥问题?
@Yunmo-1 版本旧了,用 0.6.9
@1553767977 @faithleysath 参考 官方文档 返回API没有now
字段,因此报错
建议自行独自调用API看看返回是怎么样的
@kexue-z
jin今天重新pip了一下版本,显示这个
我调用了一下api,北京七天天气,下面贴一下
{
"code": "200",
"updateTime": "2023-07-31T21:35+08:00",
"fxLink": "https://www.qweather.com/weather/beijing-101010100.html",
"daily": [
{
"fxDate": "2023-07-31",
"sunrise": "05:11",
"sunset": "19:30",
"moonrise": "18:47",
"moonset": "03:51",
"moonPhase": "盈凸月",
"moonPhaseIcon": "803",
"tempMax": "26",
"tempMin": "24",
"iconDay": "311",
"textDay": "大暴雨",
"iconNight": "307",
"textNight": "大雨",
"wind360Day": "109",
"windDirDay": "东南风",
"windScaleDay": "3-4",
"windSpeedDay": "19",
"wind360Night": "90",
"windDirNight": "东风",
"windScaleNight": "1-2",
"windSpeedNight": "3",
"humidity": "98",
"precip": "76.0",
"pressure": "1003",
"vis": "5",
"cloud": "100",
"uvIndex": "2"
},
{
"fxDate": "2023-08-01",
"sunrise": "05:12",
"sunset": "19:29",
"moonrise": "19:37",
"moonset": "05:12",
"moonPhase": "盈凸月",
"moonPhaseIcon": "803",
"tempMax": "30",
"tempMin": "25",
"iconDay": "305",
"textDay": "小雨",
"iconNight": "305",
"textNight": "小雨",
"wind360Day": "180",
"windDirDay": "南风",
"windScaleDay": "1-2",
"windSpeedDay": "3",
"wind360Night": "225",
"windDirNight": "西南风",
"windScaleNight": "1-2",
"windSpeedNight": "3",
"humidity": "94",
"precip": "5.1",
"pressure": "999",
"vis": "24",
"cloud": "62",
"uvIndex": "2"
},
{
"fxDate": "2023-08-02",
"sunrise": "05:13",
"sunset": "19:28",
"moonrise": "20:17",
"moonset": "06:34",
"moonPhase": "满月",
"moonPhaseIcon": "804",
"tempMax": "32",
"tempMin": "26",
"iconDay": "305",
"textDay": "小雨",
"iconNight": "305",
"textNight": "小雨",
"wind360Day": "225",
"windDirDay": "西南风",
"windScaleDay": "1-2",
"windSpeedDay": "3",
"wind360Night": "225",
"windDirNight": "西南风",
"windScaleNight": "1-2",
"windSpeedNight": "3",
"humidity": "91",
"precip": "5.1",
"pressure": "993",
"vis": "25",
"cloud": "62",
"uvIndex": "2"
},
{
"fxDate": "2023-08-03",
"sunrise": "05:14",
"sunset": "19:27",
"moonrise": "20:49",
"moonset": "06:34",
"moonPhase": "亏凸月",
"moonPhaseIcon": "805",
"tempMax": "33",
"tempMin": "26",
"iconDay": "104",
"textDay": "阴",
"iconNight": "305",
"textNight": "小雨",
"wind360Day": "225",
"windDirDay": "西南风",
"windScaleDay": "1-2",
"windSpeedDay": "3",
"wind360Night": "225",
"windDirNight": "西南风",
"windScaleNight": "1-2",
"windSpeedNight": "3",
"humidity": "90",
"precip": "0.0",
"pressure": "992",
"vis": "25",
"cloud": "25",
"uvIndex": "9"
},
{
"fxDate": "2023-08-04",
"sunrise": "05:15",
"sunset": "19:25",
"moonrise": "21:18",
"moonset": "09:10",
"moonPhase": "亏凸月",
"moonPhaseIcon": "805",
"tempMax": "33",
"tempMin": "24",
"iconDay": "104",
"textDay": "阴",
"iconNight": "305",
"textNight": "小雨",
"wind360Day": "180",
"windDirDay": "南风",
"windScaleDay": "1-2",
"windSpeedDay": "3",
"wind360Night": "90",
"windDirNight": "东风",
"windScaleNight": "1-2",
"windSpeedNight": "3",
"humidity": "90",
"precip": "0.0",
"pressure": "991",
"vis": "25",
"cloud": "25",
"uvIndex": "4"
},
{
"fxDate": "2023-08-05",
"sunrise": "05:16",
"sunset": "19:24",
"moonrise": "21:43",
"moonset": "10:23",
"moonPhase": "亏凸月",
"moonPhaseIcon": "805",
"tempMax": "30",
"tempMin": "23",
"iconDay": "305",
"textDay": "小雨",
"iconNight": "305",
"textNight": "小雨",
"wind360Day": "90",
"windDirDay": "东风",
"windScaleDay": "1-2",
"windSpeedDay": "3",
"wind360Night": "45",
"windDirNight": "东北风",
"windScaleNight": "1-2",
"windSpeedNight": "3",
"humidity": "92",
"precip": "2.5",
"pressure": "993",
"vis": "23",
"cloud": "60",
"uvIndex": "6"
},
{
"fxDate": "2023-08-06",
"sunrise": "05:17",
"sunset": "19:23",
"moonrise": "22:08",
"moonset": "11:35",
"moonPhase": "亏凸月",
"moonPhaseIcon": "805",
"tempMax": "30",
"tempMin": "23",
"iconDay": "305",
"textDay": "小雨",
"iconNight": "305",
"textNight": "小雨",
"wind360Day": "90",
"windDirDay": "东风",
"windScaleDay": "1-2",
"windSpeedDay": "3",
"wind360Night": "45",
"windDirNight": "东北风",
"windScaleNight": "1-2",
"windSpeedNight": "3",
"humidity": "90",
"precip": "2.5",
"pressure": "992",
"vis": "24",
"cloud": "60",
"uvIndex": "3"
}
],
"refer": {
"sources": [
"QWeather",
"NMC",
"ECMWF"
],
"license": [
"QWeather Developers License"
]
}
}
你这里用的是每日天气,但是报错的是实时天气,,,不是同一个东西
v0.6.11
使用个人开发版API,安装最新版本heweather仍然报错,报错原因相同
免费API不受影响
有两种订阅模式,相应API要用相应的模式,免费订阅 标准订阅
有两种订阅模式,相应API要用相应的模式,免费订阅 标准订阅
啊,发现好像是和风天气改了API标准,原来如此,感谢
我在使用个人开发板api时,插件报错如下图所示
尝试使用免费版api 问题未复现,图片正常发送
个人开发板api配置情况如下图所示
![image](https://github.com/kexue-z/nonebot-plugin-heweather/assets/39228172/0541271f-371f-4f1d-9d78-9e1922532582)
使用的版本是几个小时前用nb指令安装的插件 先谢谢大佬解惑