rhming / UnicomDailyTask

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

本地及华为云函数均报错KeyError: 'data' #45

Closed c90c90 closed 2 years ago

c90c90 commented 2 years ago

报错日志如下

 File "/opt/function/code/activity/unicom/superSimpleTask.py", line 90, in run
    for item in self.getTask('superEasy'):
  File "/opt/function/code/activity/unicom/superSimpleTask.py", line 34, in getTask
    return data['data']
KeyError: 'data'
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/opt/function/runtime/python3.6/rtsp/python/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/opt/function/runtime/python3.6/rtsp/python/lib/python3.6/threading.py", line 864, in run
    self._target(*self._args, **self._kwargs)
  File "/opt/function/code/activity/unicom/superSimpleTask.py", line 90, in run
    for item in self.getTask('superEasy'):
  File "/opt/function/code/activity/unicom/superSimpleTask.py", line 34, in getTask
    return data['data']
KeyError: 'data'
Exception in thread Thread-3:
Traceback (most recent call last):
  File "/opt/function/runtime/python3.6/rtsp/python/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/opt/function/runtime/python3.6/rtsp/python/lib/python3.6/threading.py", line 864, in run
    self._target(*self._args, **self._kwargs)
  File "/opt/function/code/activity/unicom/superSimpleTask.py", line 90, in run
    for item in self.getTask('superEasy'):
  File "/opt/function/code/activity/unicom/superSimpleTask.py", line 34, in getTask
    return data['data']
KeyError: 'data'
Exception in thread Thread-4:
Traceback (most recent call last):
  File "/opt/function/runtime/python3.6/rtsp/python/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/opt/function/runtime/python3.6/rtsp/python/lib/python3.6/threading.py", line 864, in run
    self._target(*self._args, **self._kwargs)
  File "/opt/function/code/activity/unicom/superSimpleTask.py", line 90, in run
    for item in self.getTask('superEasy'):
  File "/opt/function/code/activity/unicom/superSimpleTask.py", line 34, in getTask
    return data['data']
KeyError: 'data'
c90c90 commented 2 years ago

刚看到#13的issue中的解决方案,已删除数据库中woread