import json try: f = open('csv/last_updates.json', 'r') last_updates = json.load(f) f.close() last_updates['stocks']['force'] = True #last_updates['weather']['force'] = True f = open('csv/last_updates.json', 'w') json.dump(last_updates, f) f.close() except: pass