Json module error for saving dictionary <p>I'm coding a program to oraganise my homework. I got an error while trying to save my dicts with json and i have no idea what to do. I'm really lost. Also I'm kind of a noob so don't post anything to complex if you can. Thanks Here's the error</p> <pre><code> Traceback (most recent call last): File "Homework.py", line 12, in &lt;module&gt; json.load(f1) File "F:\Software\Python\lib\json\__init__.py", line 268, in load parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw) File "F:\Software\Python\lib\json\__init__.py", line 318, in loads return _default_decoder.decode(s) File "F:\Software\Python\lib\json\decoder.py", line 343, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "F:\Software\Python\lib\json\decoder.py", line 361, in raw_decode raise ValueError(errmsg("Expecting value", s, err.value)) from None ValueError: Expecting value: line 1 column 1 (char 0) </code></pre> <p>If you want my whole code (not finished yet, it's missing a lot)</p> <pre><code>#insert date to rate urgency of the tasks #BLOCK 1:1 print("today's date, month(insert month number)") ThisMonth = input("&gt;&gt;&gt;") print("today's date, day(insert day number)") ThisDay = input("&gt;&gt;&gt;") #BLOCK 1:2 #import dictionaries import json with open('LessonOut.txt', 'r') as f1: json.load(f1) with open('ExercisesOut.txt', 'r') as f2: json.load(f2) with open('AssignmentOut.txt', 'r') as f3: json.load(f3) #BLOCK 1:5 #everything will be in a while true loop for it to run smoothly until stopped while True: Input = input('&gt;&gt;&gt;') #This is used to add a task #BLOCK 2:1 if Input == 'add': print('Name of task?') Name = input('&gt;&gt;&gt;') print('Description of task?') Desc = input('&gt;&gt;&gt;') print('Rate the time it takes you to do the task on a scale from 1 to 20') Time = input('&gt;&gt;&gt;') print('&gt;&gt;&gt;') Imp = input('&gt;&gt;&gt;') print("Rate how much you want to do it on a scale from 1 to 5 (1= want to do it, 5= don't want to") Want = input("&gt;&gt;&gt;") print("enter deadline (month)") TimeMonth = input("&gt;&gt;&gt;") print("enter deadline (day)") TimeDay = input("&gt;&gt;&gt;") print("what type of homework is it? (Lesson/Exercises/Assignment)") Type = input("&gt;&gt;&gt;") #determines what type of task it is and puts it in the right dictionary #BLOCK 2:2 #Used to calculate time left to finish assignment DayLeft = 0 if ThisMonth &gt; TimeMonth: TimeMonth = TimeMonth + 12 if ThisMonth == ( 1 or 3 or 5 or 7 or 8 or 10 or 12 ) and TimeDay &lt; ThisDay: ThisMonth = ThisMonth + 1 DayLeft = DayLeft + ( 31 - ThisDay ) elif ThisMonth == 1 or 3 or 5 or 7 or 8 or 10 or 12: ThisMonth = ThisMonth + 1 DayLeft = DayLeft + ( TimeDay - ThisDay ) #BLOCK 2:3 while ThisMonth &lt; TimeMonth: if ThisMonth == 1 or 3 or 5 or 7 or 8 or 10 or 12: ThisMonth = ThisMonth + 1 DayLeft = DayLeft + 31 elif ThisMonth == 4 or 6 or 9 or 11 or 16 or 18 or 21 or 23: ThisMonth = ThisMonth + 1 DayLeft = DayLeft + 30 elif ThisMonth== 2 or 14: ThisMonth = ThisMonth + 1 DayLeft = DayLeft + 28 #BLOCK 2:4 if Type == Lesson: Rating = Time + Imp + Want Lesson.update = {DayLeft:(Name,Desc,Rating,TimeDay,TimeMonth)} if Type == Exercises: Rating = Time + Imp + Want Exercises.update = {DayLeft:(Name,Desc,Rating,TimeDay,TimeMonth)} if Type == Assignment: Rating = Time + Imp + Want Assignment.update = {DayLeft:(Name,Desc,Rating,TimeDay,TimeMonth)} #BLOCK 5:1 if Input == 'quit': print ("are you sure you want to quit?") Input = input('&gt;&gt;&gt;') if Input == 'Yes' or 'yes' or 'y' or 'Y' or 'Yse' or 'yse': #BLOCK 5:2 #Save an output dictionaries with open('LessonOut.txt', 'w') as f1: json.dump(Lesson, f1) with open('ExercisesOut.txt', 'w') as f1: json.dump(Exercises, f1) with open('AssignmentOut.txt', 'w') as f1: json.dump(Assignment, f1) break break break </code></pre>