apscheduler i got a 'ValueError'

Viewed 20

hello i have my python code:

from apscheduler.schedulers.background import BackgroundScheduler

@cross_origin
@app.route('/userdatas', methods=['POST'])
def post_datas():

    Usersdatas = requests.get('http://localhost:5000/users').json()
    #some code here, i take data from this json to return another jsonfile
    datas_to_post_every_1_day = {"owner_id": 12, 'user': 12932}
                            
    jsonfile = open('file.json')
    data = json.load(jsonfile)
    data.append(datas_to_post_every_1_day)
    print(datas_to_post_every_1_day)

    oppen_file = (open('filed.json', 'r'))

    return(open_file.read())
    #so, this return my new jsonfile

    sched = BackgroundScheduler(daemon=True)
    sched.add_job(post_datas, 'interval', seconds=20)
    sched.start()

return this in the console :

   # raise ValueError('The following arguments have not been supplied: %s' %
   #ValueError: The following arguments have not been supplied: f

so, what this error message mean ? i don't find solution i try to do kwargs = '' but it still dont work. somebody can help me please ? have a nice day

0 Answers
Related