opq-osc / OPQ-SetuBot

基于botoy和OPQBot的色图机器人
MIT License
212 stars 34 forks source link

python3 bot.py运行错误 #26

Closed MapleNe closed 3 years ago

MapleNe commented 3 years ago
root@a292778464:~/pic# python3 bot.py +---------------------+-------+------------------------------------------------------------+ Receiver Count Info +---------------------+-------+------------------------------------------------------------+ Friend Msg Receiver 6 sysinfo/yuanShen/cmd/addsetu/searchPicture/setu Group Msg Receiver 7 sysinfo/yuanShen/setuRevoke/cmd/addsetu/searchPicture/setu Event Receiver 1 eventMonitor +---------------------+-------+------------------------------------------------------------+ +-----------------+ Removed Plugins +-----------------+

+-----------------+ --- Logging error in Loguru Handler #1 --- Record was: {'elapsed': datetime.timedelta(microseconds=789109), 'exception': None, 'extra': {}, 'file': (name='pixivApi.py', path='/root/pic/module/pixivApi.py'), 'function': 'if_refresh_token', 'level': (name='SUCCESS', no=25, icon='\u2714\ufe0f'), 'line': 109, 'message': 'pixivToken\u8f7d\u5165\u6210\u529f~', 'module': 'pixivApi', 'name': 'module.pixivApi', 'process': (id=28498, name='MainProcess'), 'thread': (id=140411353429760, name='Thread-2'), 'time': datetime(2021, 2, 19, 10, 13, 23, 391534, tzinfo=datetime.timezone(datetime.timedelta(seconds=10800), 'MSK'))} Traceback (most recent call last): File "/usr/local/lib/python3.8/dist-packages/loguru/_handler.py", line 177, in emit self._sink.write(str_record) File "/usr/local/lib/python3.8/dist-packages/loguru/_simple_sinks.py", line 26, in write self._stream.write(message) UnicodeEncodeError: 'latin-1' codec can't encode characters in position 0-1: ordinal not in range(256) --- End of logging error --- Exception in thread Thread-2: Traceback (most recent call last): File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner self.run() File "/usr/lib/python3.8/threading.py", line 870, in run self._target(*self._args, **self._kwargs) File "/root/pic/module/pixivApi.py", line 118, in if_refresh_token if time.time() - self.tokendata['time'] >= int(self.tokendata['expires_in']): # \u5237\u65b0 KeyError: 'expires_in' --- Logging error in Loguru Handler #1 --- Record was: {'elapsed': datetime.timedelta(microseconds=852864), 'exception': None, 'extra': {}, 'file': (name='database.py', path='/root/pic/module/database.py'), 'function': 'updateAllGroupData', 'level': (name='INFO', no=20, icon='\u2139\ufe0f'), 'line': 376, 'message': '\u5f00\u59cb\u66f4\u65b0\u6240\u6709\u7fa4\u6570\u636e~', 'module': 'database', 'name': 'module.database', 'process': (id=28498, name='MainProcess'), 'thread': (id=140411421280064, name='MainThread'), 'time': datetime(2021, 2, 19, 10, 13, 23, 455289, tzinfo=datetime.timezone(datetime.timedelta(seconds=10800), 'MSK'))} Traceback (most recent call last): File "/usr/local/lib/python3.8/dist-packages/loguru/_handler.py", line 177, in emit self._sink.write(str_record) File "/usr/local/lib/python3.8/dist-packages/loguru/_simple_sinks.py", line 26, in write self._stream.write(message) UnicodeEncodeError: 'latin-1' codec can't encode characters in position 0-1: ordinal not in range(256) --- End of logging error --- --- Logging error in Loguru Handler #1 --- Record was: {'elapsed': datetime.timedelta(seconds=9, microseconds=917298), 'exception': None, 'extra': {}, 'file': (name='database.py', path='/root/pic/module/database.py'), 'function': 'updateData', 'level': (name='INFO', no=20, icon='\u2139\ufe0f'), 'line': 367, 'message': '\u7fa4:623550522\u5df2\u5b58\u5728,\u66f4\u65b0\u6570\u636e~', 'module': 'database', 'name': 'module.database', 'process': (id=28498, name='MainProcess'), 'thread': (id=140411421280064, name='MainThread'), 'time': datetime(2021, 2, 19, 10, 13, 32, 519723, tzinfo=datetime.timezone(datetime.timedelta(seconds=10800), 'MSK'))} Traceback (most recent call last): File "/usr/local/lib/python3.8/dist-packages/loguru/_handler.py", line 177, in emit self._sink.write(str_record) File "/usr/local/lib/python3.8/dist-packages/loguru/_simple_sinks.py", line 26, in write self._stream.write(message) UnicodeEncodeError: 'latin-1' codec can't encode characters in position 0-1: ordinal not in range(256) --- End of logging error --- --- Logging error in Loguru Handler #1 --- Record was: {'elapsed': datetime.timedelta(seconds=9, microseconds=926584), 'exception': None, 'extra': {}, 'file': (name='database.py', path='/root/pic/module/database.py'), 'function': 'updateAllGroupData', 'level': (name='SUCCESS', no=25, icon='\u2714\ufe0f'), 'line': 391, 'message': '\u66f4\u65b0\u7fa4\u4fe1\u606f\u6210\u529f~', 'module': 'database', 'name': 'module.database', 'process': (id=28498, name='MainProcess'), 'thread': (id=140411421280064, name='MainThread'), 'time': datetime(2021, 2, 19, 10, 13, 32, 529009, tzinfo=datetime.timezone(datetime.timedelta(seconds=10800), 'MSK'))} Traceback (most recent call last): File "/usr/local/lib/python3.8/dist-packages/loguru/_handler.py", line 177, in emit self._sink.write(str_record) File "/usr/local/lib/python3.8/dist-packages/loguru/_simple_sinks.py", line 26, in write self._stream.write(message) UnicodeEncodeError: 'latin-1' codec can't encode characters in position 0-1: ordinal not in range(256) --- End of logging error ---

还有lolicon api 开启 其他几项不开启会找不到色图

yuban10703 commented 3 years ago

阿哲,pivix的api现在有点问题,先别用..

yuban10703 commented 3 years ago

image

测试了一下,好像没问题...

yuban10703 commented 3 years ago

pixiv的登录现在有点问题,先别用..

MapleNe commented 3 years ago

那个loliconapi还能用吗? 只开这一个api的话会显示找不到色图

yuban10703 commented 3 years ago

你的apikey填了么?,不应该🦆。。

MapleNe commented 3 years ago

你的apikey填了么?,不应该🦆。。

填了,应该是我没配额了,话说发图慢是opq的问题吗,我用go-cqhttp没问题

yuban10703 commented 3 years ago

你把反代关掉试试,这个反代有时候慢的离谱。。opq下载图片超过10s又发不出去。。。

MapleNe commented 3 years ago

你把反代关掉试试,这个反代有时候慢的离谱。。opq下载图片超过10s又发不出去。。。

我应该没开反代

yuban10703 commented 3 years ago

那我回去再看看

test-black commented 3 years ago

snipaste_20210223_013345

应该也是pixiv的登陆部分出问题了

yuban10703 commented 3 years ago

snipaste_20210223_013345

应该也是pixiv的登陆部分出问题了

pixiv的登录改了,还没修

test-black commented 3 years ago

参考下这个? https://gist.github.com/upbit/6edda27cb1644e94183291109b8a5fde

yuban10703 commented 3 years ago

好像有点麻烦,还没人把模拟登陆写出来么w(゚Д゚)w

yuban10703 commented 3 years ago

好像也不是不行,晚点改一下吧..

test-black commented 3 years ago

模拟网页和客户端优先,selenium还是太tricky了