rhming / UnicomDailyTask

联通日常任务 腾讯云函数定时执行
MIT License
152 stars 77 forks source link

执行成功一次,之后都是报错 #64

Closed chengazhen closed 2 years ago

chengazhen commented 2 years ago

为什么要从cookie 里面读取 设备id, 直接拿取设备id不行吗

{"errorCode":1,"errorMessage":"user code exception caught","stackTrace":"Traceback (most recent call last):\n File \"/var/user/index.py\", line 114, in main_handler\n Template(KldggAct)\n File \"/var/user/index.py\", line 38, in Template\n ts.append(Thread(target=cls(mobile, password).run))\n File \"/var/user/activity/wolearn/kldgg.py\", line 10, in init\n super(KldggAct, self).init(mobile, password)\n File \"/var/user/activity/wolearn/wolearn.py\", line 13, in init\n super(WoLearn, self).init(mobile, password)\n File \"/var/user/utils/unicomLogin.py\", line 34, in init\n self.deviceId = self.global_config['cookie']['d_deviceCode']\nKeyError: 'd_deviceCode'","statusCode":430}

END RequestId:eb911dbc-7e4e-4508-abd8-117b217669bb

chengazhen commented 2 years ago

解决办法

需要把数据库里面的数据删除重新登录一下, 猜测可能是登录的时候出现失败,判读不够健壮,仍然把数据存进去了

rhming commented 2 years ago