title: Python: Can't convert 'tuple' object to str implicitly
body: <p>I'm trying to get my code to store messages within txt file using json. Each time a new message comes in, it will add the new message to the array.</p>
  <p>The structure will be:</p>
  <pre><code>{
    &quot;Messages&quot;: {
      &quot;Test Contact 2&quot;: {
        &quot;0&quot;: &quot;\&quot;Message 1&quot;
      },
      &quot;Test Contact 1&quot;: {
        &quot;0&quot;: &quot;\&quot;Message 1\&quot;&quot;,
        &quot;1&quot;: &quot;\&quot;Message 2\&quot;&quot;
      }
    }
  }
  </code></pre>
  <p>And here is my current code:</p>
  <pre><code>class PluginOne(IPlugin):
      def process(self):
          try:
              print(&quot;Database&quot;)
              data_store('Test contact', 'Text Message')
              pass
          except Exception as exc:
              print(&quot;Error in database: &quot; + exc.args)
  
  
  def data_store(key_id, key_info):
      try:
          with open('Plugins/Database/messages.txt', 'r+') as f:
              data = json.load(f)
              data[key_id] = key_info
              f.seek(0)
              json.dump(data, f)
              f.truncate()
          pass
      except Exception as exc:
          print(&quot;Error in data store: &quot; + exc.args)
  </code></pre>
  <p>when I try to run the code, I get the following error</p>
  <pre><code>Can't convert 'tuple' object to str implicitly
  </code></pre>