Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

青龙报错 #6

Closed
fplj-fplj opened this issue Mar 11, 2023 · 43 comments
Closed

青龙报错 #6

fplj-fplj opened this issue Mar 11, 2023 · 43 comments
Labels
enhancement New feature or request

Comments

@fplj-fplj
Copy link

开始执行... 2023-03-11 22:13:24

Traceback (most recent call last):
File "/ql/data/scripts/GamerNoTitle_MHYY-AutoCheckin/main.py", line 24, in
config = json.loads(os.environ.get('mhyy'))
File "/usr/local/lib/python3.10/json/init.py", line 346, in loads
return _default_decoder.decode(s)
File "/usr/local/lib/python3.10/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/local/lib/python3.10/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 2 column 14 (char 15)
Sentry is attempting to send 2 pending error messages
Waiting up to 2 seconds
Press Ctrl-C to quit

执行结束... 2023-03-11 22:13:33 耗时 9 秒     

@GamerNoTitle
Copy link
Owner

看样子是配置上面配置错了,检查一下是否符合json的格式吧

@fplj-fplj
Copy link
Author

开始执行... 2023-03-15 05:00:01

从官方API获取到云·原神最新版本号:3.5.0
为了避免同一时间签到人数太多导致被官方怀疑,开始休眠 80 秒
你当前拥有免费时长 253 分钟,畅玩卡状态为 已过期,拥有米云币 0 枚
获取到公告列表:{'id': 0, 'title': '', 'words': '', 'icon': '', 'start_time': '0', 'end_time': '0', 'font_style': 0}
Traceback (most recent call last):
File "/ql/data/scripts/GamerNoTitle_MHYY-AutoCheckin/main.py", line 134, in
raise RunError(
main.RunError: 签到失败!请带着本次运行的所有log内容到 https://github.com/ElainaMoe/MHYY-AutoCheckin/issues 发起issue解决(或者自行解决)。签到出错,返回信息如下:{"retcode":0,"message":"OK","data":{"list":[{"id":"1635747994378719232","status":"NotificationStatusUnread","type":"NotificationTypePopup","priority":30,"source":"","desc":"","msg":"{"num":15,"over_num":0,"type":2,"msg":"每日登录奖励","func_type":1}","created_at":"1678827687"},{"id":"1635385799396564992","status":"NotificationStatusUnread","type":"NotificationTypePopup","priority":30,"source":"","desc":"","msg":"{"num":15,"over_num":0,"type":2,"msg":"每日登录奖励","func_type":1}","created_at":"1678741333"}]}}
Sentry is attempting to send 2 pending error messages
Waiting up to 2 seconds
Press Ctrl-C to quit

@fplj-fplj
Copy link
Author

又这样了

@GamerNoTitle
Copy link
Owner

额 我的建议是先手机打开云原神把所有的通知清理一下(就弹出那个15分钟的那个提示点点点就是了)
然后明天签到的时候如果还出现同样的问题再看日志里面是怎么写的
要不然签到成功和失败的东西混在一起说实在还是很难判断的
我现在看你这个其实是签到成功了的……

@GamerNoTitle
Copy link
Owner

又这样了

再说你这次这个提示跟上次那个不一样好吧 咋就又这样了 =-=

@fplj-fplj
Copy link
Author

昨天签成了,前天没有,两天都报错

@fplj-fplj
Copy link
Author

报一样的

@GamerNoTitle
Copy link
Owner

额 我的建议是先手机打开云原神把所有的通知清理一下(就弹出那个15分钟的那个提示点点点就是了) 然后明天签到的时候如果还出现同样的问题再看日志里面是怎么写的 要不然签到成功和失败的东西混在一起说实在还是很难判断的 我现在看你这个其实是签到成功了的……

那你先把所有的弹出信息先点掉先,然后明天签到失败的时候把日志发出来

@GamerNoTitle
Copy link
Owner

混在一起确实不好看

@fplj-fplj
Copy link
Author

ok

@GamerNoTitle
Copy link
Owner

我目前看你这个是米忽悠返回了两次的签到结果,但是我设置的是对签到结果的固定格式进行校验,因为返回了两次所以跟我设定的格式不一样,所以才提示签到失败
附上一个我的运行结果

@GamerNoTitle
Copy link
Owner

开始执行... 2023-03-15 08:00:00

从官方API获取到云·原神最新版本号:3.5.0
为了避免同一时间签到人数太多导致被官方怀疑,开始休眠 1541 秒
你当前拥有免费时长 600 分钟,畅玩卡状态为 未开通,拥有米云币 300 枚
获取到公告列表:{'id': 0, 'title': '', 'words': '', 'icon': '', 'start_time': '0', 'end_time': '0', 'font_style': 0}
获取签到情况成功!当前免费时长已经达到上限!签到情况为{"num":0,"over_num":15,"type":2,"msg":"每日登录奖励","func_type":1}
完整返回体为:{"retcode":0,"message":"OK","data":{"list":[{"id":"1635799402184462336","status":"NotificationStatusUnread","type":"NotificationTypePopup","priority":30,"source":"","desc":"","msg":"{"num":0,"over_num":15,"type":2,"msg":"每日登录奖励","func_type":1}","created_at":"1678839943"},{"id":"1635441130587836416","status":"NotificationStatusUnread","type":"NotificationTypePopup","priority":30,"source":"","desc":"","msg":"{"num":0,"over_num":15,"type":2,"msg":"每日登录奖励","func_type":1}","created_at":"1678754525"},{"id":"1635078549280935936","status":"NotificationStatusUnread","type":"NotificationTypePopup","priority":30,"source":"","desc":"","msg":"{"num":0,"over_num":15,"type":2,"msg":"每日登录奖励","func_type":1}","created_at":"1678668079"},{"id":"1634719471937540096","status":"NotificationStatusUnread","type":"NotificationTypePopup","priority":30,"source":"","desc":"","msg":"{"num":0,"over_num":15,"type":2,"msg":"每日登录奖励","func_type":1}","created_at":"1678582468"},{"id":"1634351201166315520","status":"NotificationStatusUnread","type":"NotificationTypePopup","priority":30,"source":"","desc":"","msg":"{"num":0,"over_num":15,"type":2,"msg":"每日登录奖励","func_type":1}","created_at":"1678494665"},{"id":"1633981718681636864","status":"NotificationStatusUnread","type":"NotificationTypePopup","priority":30,"source":"","desc":"","msg":"{"num":0,"over_num":15,"type":2,"msg":"每日登录奖励","func_type":1}","created_at":"1678406574"},{"id":"1633627167155834880","status":"NotificationStatusUnread","type":"NotificationTypePopup","priority":30,"source":"","desc":"","msg":"{"num":0,"over_num":15,"type":2,"msg":"每日登录奖励","func_type":1}","created_at":"1678322042"},{"id":"1632683954492428288","status":"NotificationStatusUnread","type":"NotificationTypePopup","priority":30,"source":"","desc":"","msg":"{"num":0,"over_num":15,"type":2,"msg":"每日登录奖励","func_type":1}","created_at":"1678097163"}]}}

执行结束... 2023-03-15 08:25:45 耗时 1545 秒 

@Ayx03
Copy link
Contributor

Ayx03 commented Mar 18, 2023

#7 should fix this

@fplj-fplj
Copy link
Author

开始执行... 2023-03-16 05:08:01

从官方API获取到云·原神最新版本号:3.5.0
为了避免同一时间签到人数太多导致被官方怀疑,开始休眠 97 秒
你当前拥有免费时长 260 分钟,畅玩卡状态为 已过期,拥有米云币 0 枚
获取到公告列表:{'id': 0, 'title': '', 'words': '', 'icon': '', 'start_time': '0', 'end_time': '0', 'font_style': 0}
Traceback (most recent call last):
File "/ql/data/scripts/GamerNoTitle_MHYY-AutoCheckin/main.py", line 134, in
raise RunError(
main.RunError: 签到失败!请带着本次运行的所有log内容到 https://github.com/ElainaMoe/MHYY-AutoCheckin/issues 发起issue解决(或者自行解决)。签到出错,返回信息如下:{"retcode":0,"message":"OK","data":{"list":[{"id":"1636112471418753024","status":"NotificationStatusUnread","type":"NotificationTypePopup","priority":30,"source":"","desc":"","msg":"{"num":15,"over_num":0,"type":2,"msg":"每日登录奖励","func_type":1}","created_at":"1678914585"}]}}
Sentry is attempting to send 2 pending error messages
Waiting up to 2 seconds
Press Ctrl-C to quit

执行结束... 2023-03-16 05:09:49 耗时 108 秒     

@GamerNoTitle
Copy link
Owner

你先更新一下 #7 那位兄弟应该修了这个问题了

@fplj-fplj
Copy link
Author

怎么设置sever酱提醒

@GamerNoTitle
Copy link
Owner

没做这个功能……说实话

@GamerNoTitle
Copy link
Owner

因为好像没有太大的必要?需要的话可以自己加一个
参考:https://github.com/GamerNoTitle/wyycg-autocheckin/blob/cf6a092602b531da0a665c54092a8b1363c33216/main.py#L101

@fplj-fplj
Copy link
Author

不会呀...

@Ayx03
Copy link
Contributor

Ayx03 commented Mar 19, 2023

不会呀...

把使用 Server 酱的函数复制过来,print 下面加一行调用这个函数发消息的语句不就行了

@fplj-fplj
Copy link
Author

...
还是不会

@GamerNoTitle
Copy link
Owner

=-= 你发个server酱的官网先

@GamerNoTitle
Copy link
Owner

你想要提醒哪些东西 是日志还是说就一个签到成功的提示

@GamerNoTitle GamerNoTitle added bug Something isn't working enhancement New feature or request question Further information is requested labels Mar 22, 2023
@Ayx03
Copy link
Contributor

Ayx03 commented Mar 22, 2023

=-= 你发个server酱的官网先

https://sct.ftqq.com

@xiaobuboy
Copy link

遇到报错:
从官方API获取到云·原神最新版本号:3.5.0

为了避免同一时间签到人数太多导致被官方怀疑,开始休眠 1930 秒

Traceback (most recent call last):
File "/ql/scripts/GamerNoTitle_MHYY/main.py", line 83, in
f"你当前拥有免费时长 {json.loads(wallet.text)['data']['free_time']['free_time']} 分钟,畅玩卡状态为 {json.loads(wallet.text)['data']['play_card']['short_msg']},拥有米云币 {json.loads(wallet.text)['data']['coin']['coin_num']} 枚")
TypeError: 'NoneType' object is not subscriptable

Sentry is attempting to send 2 pending error messages
Waiting up to 2 seconds
Press Ctrl-C to quit

@GamerNoTitle
Copy link
Owner

image
在如图所示位置加一行这个

    print(wallet.text)

然后重新运行,看看返回的是什么

@xiaobuboy
Copy link

排查出来了,在if语句判断字符串的时候,字符串后面应该加单引号
if wallet.text == '{"data":null,"message":"登录已失效,请重新登录","retcode":-100}':
这样才能正常运行

@GamerNoTitle
Copy link
Owner

哦我没转变量类型是吧 好吧……
会改的话可以交个PR哦 就算做contributor了:D

GamerNoTitle added a commit that referenced this issue Apr 5, 2023
@GamerNoTitle
Copy link
Owner

排查出来了,在if语句判断字符串的时候,字符串后面应该加单引号 if wallet.text == '{"data":null,"message":"登录已失效,请重新登录","retcode":-100}': 这样才能正常运行

修了一下 应该没问题了

@xiaobuboy
Copy link

现在可以运行了,青龙上面日志显示可用时长有增长15分钟,但是我再登录云原神app,里面还是会弹出时长增加15分钟的提示,不知道这正不正常。

@Ayx03
Copy link
Contributor

Ayx03 commented Apr 6, 2023

现在可以运行了,青龙上面日志显示可用时长有增长15分钟,但是我再登录云原神app,里面还是会弹出时长增加15分钟的提示,不知道这正不正常。

是这样的,不知道能不能让脚本把这个提示「点」掉

@GamerNoTitle
Copy link
Owner

主要是「点」这个操作我没有找到相关的接口,找到的话就加上了

@GamerNoTitle
Copy link
Owner

现在可以运行了,青龙上面日志显示可用时长有增长15分钟,但是我再登录云原神app,里面还是会弹出时长增加15分钟的提示,不知道这正不正常。

甚至你连续几天不登录会连续给你弹好几个……

@fplj-fplj
Copy link
Author

大佬,只是发一个签到成功就行了,可以帮忙加一下吗

@fplj-fplj
Copy link
Author

还有剩余时间

@GamerNoTitle
Copy link
Owner

可以加是可以加 你是运行在什么平台 青龙还是云函数还是服务器
我先得说明 这个功能没多少人用 所以我肯定是写好了默认关闭的 你自己去开
而且短时间内我应该不会加 我现在的工作重心在另一个项目上
https://github.com/GamerNoTitle/VSC

@fplj-fplj
Copy link
Author

青龙

@fplj-fplj
Copy link
Author

谢谢

@GamerNoTitle GamerNoTitle removed bug Something isn't working question Further information is requested labels May 3, 2023
@fplj-fplj
Copy link
Author

还有如何添加多账号

@GamerNoTitle
Copy link
Owner

还有如何添加多账号

image
#9

@GamerNoTitle
Copy link
Owner

晚点再弄吧 我确实没想到有人会玩多个号

@GamerNoTitle
Copy link
Owner

大佬,只是发一个签到成功就行了,可以帮忙加一下吗

加了,你更新一下,更新后在环境变量里面加如图的内容(sct随便填,只要有而且不留空就行)
image

附效果图
qq_pic_merged_1683522422568
Screenshot_2023-05-08-13-06-27-155_com tencent mm

多账号:咕咕咕~(指晚点)

@GamerNoTitle
Copy link
Owner

这边先关掉了 在#9统一解决

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants