title: text io wrapper error thing i very confused
body: <p>k so i have code, and it works nicely. launcher.py runs all of this, so if things don't look like they are being executed, they are just from another location. i keep getting an error that looks like this:</p>
  <p><code>File &quot;C:\&lt;personal directories&gt;\Python\Python39\lib\json\encoder.py&quot;, line 179, in default raise TypeError(f'Object of type {o.__class__.__name__} ' TypeError: Object of type TextIOWrapper is not JSON serializable</code></p>
  <p>i don't know why it does this. could I get some help? i may be missing something dum, but I have tried to find this error somewhere else.<br />
  code below:</p>
  <pre><code>    parent_dir = os.getcwd()
      created_dir = r&quot;\Profiles&quot;
      script_dir = parent_dir + created_dir
      profiles_path = os.path.join(script_dir, &quot;Profiles.txt&quot;)
      try:
          with open(profiles_path, &quot;r&quot;) as profile_file:
              profile_list = profile_file.read()
          print(profile_list)
      except IndexError:
          print(&quot;err&quot;)
      opening_question = input(&quot;please type the name of the profile you would like to enter. (case sensitive) \n \n $&quot;)
  
      parent_dir = os.getcwd()
      created_dir = r&quot;\Profiles&quot;
      script_dir = parent_dir + created_dir
      file_name = opening_question
      file_extention = &quot;.json&quot;
      file_dir = file_name + file_extention
      file_path = os.path.join(script_dir, file_dir)
  
      with open(profiles_path, 'r'):
          if opening_question in profile_list:
              with open(file_dir) as open_file:
                  open_file = json.dumps(open_file, indent=2, sort_keys=True)
              print(open_file)
          else:
              print(&quot;Unknown choice&quot;, opening_question)```
  </code></pre>