2022-10-10 17:46:17
Traceback (most recent call last):
File "ChatClass.py", line 404, in run
File "Chatmain.py", line 1895, in getcommand_chat
File "simuse.py", line 89, in Fetch_Message
KeyError: 'data'
报错日志反馈,这种问题应该要怎么解决
2022-10-10 17:46:17
Traceback (most recent call last):
File "ChatClass.py", line 404, in run
File "Chatmain.py", line 1895, in getcommand_chat
File "simuse.py", line 89, in Fetch_Message
KeyError: 'data'
报错日志反馈,这种问题应该要怎么解决
@samarium150
修改为i.pixiv.re后可以正常运行,但在发送图片的时候url仍是从i.pixiv.cat获取,前缀添加https://
则会出现于无法识别主机的错误
正在获取图片...
2022-02-12 12:27:10 I/Lolicon: request body: {"r18":0,"num":1,"uid":[],"keyword":"","tag":[],"size":["regular"],"proxy":"i.pixiv.re","dataAfter":null,"dataBefore":null,"dsc":null}
2022-02-12 12:27:11 I/Lolicon: {"error":"","data":[{"pid":84767496,"p":0,"uid":19730113,"title":"艾拉","author":"冬月 流桜","r18":false,"width":2400,"height":3600,"tags":["みんなのリメイク","プラスティック・メモリーズ","可塑性记忆","艾拉","Isla","アイラ","Ayra","はいてない","真空","魅惑のふともも","魅惑的大腿","ニーソ","过膝袜","おっぱい","欧派","ツインテー ル","双马尾"],"ext":"jpg","uploadDate":1601696904000,"urls":{"regular":"https://i.pixiv.cat/img-master/img/2020/10/03/12/48/24/84767496_p0_master1200.jpg"}}]}
标题: 艾拉
作者: 冬月 流桜 (uid: 19730113)
标签: [みんなのリメイク, プラスティック・メモリーズ, 可塑性记忆, 艾拉, Isla, アイラ, Ayra, はいてない, 真空, 魅惑のふと もも, 魅惑的大腿, ニーソ, 过膝袜, おっぱい, 欧派, ツインテール, 双马尾]
链接: https://pixiv.net/artworks/84767496
2022-02-12 12:27:21 E/Lolicon: io.ktor.network.sockets.ConnectTimeoutException: Connect timeout has expired [url=https://i.pixiv.cat/img-master/img/2020/10/03/12/48/24/84767496_p0_master1200.jpg, connect_timeout=unknown ms]
io.ktor.network.sockets.ConnectTimeoutException: Connect timeout has expired [url=https://i.pixiv.cat/img-master/img/2020/10/03/12/48/24/84767496_p0_master1200.jpg, connect_timeout=unknown ms]
at io.ktor.client.features.HttpTimeoutKt.ConnectTimeoutException(HttpTimeout.kt:183)
at io.ktor.client.engine.okhttp.OkUtilsKt.mapOkHttpException(OkUtils.kt:77)
at io.ktor.client.engine.okhttp.OkUtilsKt.access$mapOkHttpException(OkUtils.kt:1)
at io.ktor.client.engine.okhttp.OkHttpCallback.onFailure(OkUtils.kt:39)
at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:525)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.net.SocketTimeoutException: connect timed out
at java.base/java.net.PlainSocketImpl.waitForConnect(Native Method)
at java.base/java.net.PlainSocketImpl.socketConnect(Unknown Source)
at java.base/java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
at java.base/java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
at java.base/java.net.AbstractPlainSocketImpl.connect(Unknown Source)
at java.base/java.net.SocksSocketImpl.connect(Unknown Source)
at java.base/java.net.Socket.connect(Unknown Source)
at okhttp3.internal.platform.Platform.connectSocket(Platform.kt:128)
at okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.kt:295)
at okhttp3.internal.connection.RealConnection.connect(RealConnection.kt:207)
at okhttp3.internal.connection.ExchangeFinder.findConnection(ExchangeFinder.kt:226)
at okhttp3.internal.connection.ExchangeFinder.findHealthyConnection(ExchangeFinder.kt:106)
at okhttp3.internal.connection.ExchangeFinder.find(ExchangeFinder.kt:74)
at okhttp3.internal.connection.RealCall.initExchange$okhttp(RealCall.kt:255)
at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.kt:32)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.kt:95)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:83)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:76)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:201)
at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:517)
... 3 more
config.yml文件
# Get命令和Adv命令的模式: None/Whitelist/Blacklist
mode: None
# 是否保存图片
save: false
# 是否使用已保存的图片作为缓存
cache: false
# 是否提示Get和Adv命令已受理
notify: true
# 是否发送图片信息
verbose: true
# 图片发送模式: Simple/Flash/Forward
messageType: Simple
# 图片大小: Original/Regular/Small/Thumb/Mini
size: Regular
# 获取Pixiv图片的反向代理
proxy: i.pixiv.re
# 默认的撤回时间(单位:s)
recall: 30
# 是否撤回图片信息
recallImgInfo: false
# 是否撤回图片
recallImg: true
# 默认的冷却时间(单位:s)
cooldown: 60
# 标签过滤模式: None/Whitelist/Blacklist
tagFilterMode: None
# 标签过滤器,白名单模式只发送包含指定标签的图片,黑名单模式只发送不包含指定标签的图片。(仅Get命令,Adv命令中不生效)
tagFilter: []
@samarium150
proxyconfig.yml
# 可选:DIRECT/HTTP/SOCKS
type: DIRECT
# IP地址
hostname: 127.0.0.1
# 端口
port: 17122
报错信息
正在获取图片...
2022-02-12 10:45:18 I/Lolicon: request body: {"r18":0,"num":1,"uid":[],"keyword":"","tag":[],"size":["regular"],"proxy":"N","dataAfter":null,"dataBefore":null,"dsc":null}
2022-02-12 10:45:19 I/Lolicon: {"error":"","data":[{"pid":93859309,"p":0,"uid":12120406,"title":"水浴び","author":"星の 紅茶","r18":false,"width":682,"height":1000,"tags":["魅惑の谷間","魅惑的乳沟","オリジナル","原创","和服","kimono","水面","water surface","水浴び","bathing","リボン","蝴蝶结","巫女装束","おっぱい","欧派"],"ext":"jpg","uploadDate":1635781433000,"urls":{"regular":"https://n/img-master/img/2021/11/02/00/43/53/93859309_p0_master1200.jpg"}}]}
标题: 水浴び
作者: 星の紅茶 (uid: 12120406)
标签: [魅惑の谷間, 魅惑的乳沟, オリジナル, 原创, 和服, kimono, 水面, water surface, 水浴び, bathing, リボン, 蝴蝶结, 巫 女装束, おっぱい, 欧派]
链接: https://pixiv.net/artworks/93859309
2022-02-12 10:45:22 E/Lolicon: java.net.UnknownHostException: 不知道这样的主机。 (n)
java.net.UnknownHostException: 不知道这样的主机。 (n)
at java.base/java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
at java.base/java.net.InetAddress$PlatformNameService.lookupAllHostAddr(Unknown Source)
at java.base/java.net.InetAddress.getAddressesFromNameService(Unknown Source)
at java.base/java.net.InetAddress$NameServiceAddresses.get(Unknown Source)
at java.base/java.net.InetAddress.getAllByName0(Unknown Source)
at java.base/java.net.InetAddress.getAllByName(Unknown Source)
at java.base/java.net.InetAddress.getAllByName(Unknown Source)
at okhttp3.Dns$Companion$DnsSystem.lookup(Dns.kt:49)
at okhttp3.internal.connection.RouteSelector.resetNextInetSocketAddress(RouteSelector.kt:164)
at okhttp3.internal.connection.RouteSelector.nextProxy(RouteSelector.kt:129)
at okhttp3.internal.connection.RouteSelector.next(RouteSelector.kt:71)
at okhttp3.internal.connection.ExchangeFinder.findConnection(ExchangeFinder.kt:205)
at okhttp3.internal.connection.ExchangeFinder.findHealthyConnection(ExchangeFinder.kt:106)
at okhttp3.internal.connection.ExchangeFinder.find(ExchangeFinder.kt:74)
at okhttp3.internal.connection.RealCall.initExchange$okhttp(RealCall.kt:255)
at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.kt:32)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.kt:95)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:83)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:76)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:201)
at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:517)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
每一次都是在发送图片的时候报出错误,目前猜测可能是云服务器的问题,本地电脑执行时没有抛出无法识别主机的错误。
2022-02-11 21:16:21 E/Lolicon: java.net.UnknownHostException: 不知道这样的主机。 (n)
java.net.UnknownHostException: 不知道这样的主机。 (n)
at java.base/java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
at java.base/java.net.InetAddress$PlatformNameService.lookupAllHostAddr(Unknown Source)
at java.base/java.net.InetAddress.getAddressesFromNameService(Unknown Source)
at java.base/java.net.InetAddress$NameServiceAddresses.get(Unknown Source)
at java.base/java.net.InetAddress.getAllByName0(Unknown Source)
at java.base/java.net.InetAddress.getAllByName(Unknown Source)
at java.base/java.net.InetAddress.getAllByName(Unknown Source)
at okhttp3.Dns$Companion$DnsSystem.lookup(Dns.kt:49)
at okhttp3.internal.connection.RouteSelector.resetNextInetSocketAddress(RouteSelector.kt:164)
at okhttp3.internal.connection.RouteSelector.nextProxy(RouteSelector.kt:129)
at okhttp3.internal.connection.RouteSelector.next(RouteSelector.kt:71)
at okhttp3.internal.connection.ExchangeFinder.findConnection(ExchangeFinder.kt:205)
at okhttp3.internal.connection.ExchangeFinder.findHealthyConnection(ExchangeFinder.kt:106)
at okhttp3.internal.connection.ExchangeFinder.find(ExchangeFinder.kt:74)
at okhttp3.internal.connection.RealCall.initExchange$okhttp(RealCall.kt:255)
at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.kt:32)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.kt:95)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:83)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:76)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:201)
at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:517)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
请问一下,在发送图片时出现了这个错误,应该怎么解决