title: I am facing problem with my python software while using firebase for data storage
body: <p>i am just new to python and while i made a software that manages inventory using barcode no. i am facing issue while using firebase realtime data base for storing my json file, i did it yesterday and it was working fine but now when i am setting data in firebase using set method, its getting set but when i am getting the data from firebase it is showing data as null, also the data format that i am uploading is json an yesterday it was working fine but i dont know what messed up today, i tried everything but its not working.</p>
  <p>my_code:-</p>
  <pre><code>def set_to_firebase():
      with open(&quot;on_of.txt&quot;, mode=&quot;r&quot;) as new_file_text:
          data=new_file_text.readline()
          is_on=data
      file_size_on = os.path.getsize(&quot;on_of.txt&quot;)
      if file_size_on==0:
          pass
      else:
          if is_on==&quot;False&quot;:
              with open(&quot;data.json&quot;, &quot;r&quot;) as f:
                  file = json.load(f)
              ref.delete()
              ref.set(file)
          elif is_on==&quot;True&quot;:
              pass
  
  
  
  def get_real_data():
      with open(&quot;on_of.txt&quot;, mode=&quot;r&quot;) as new_file_text:
          data=new_file_text.readline()
          is_on=data
  
      if is_on==&quot;False&quot;:
          file_new_json = ref.get()
          with open(&quot;data.json&quot;, mode=&quot;w&quot;) as new_file_data:
              json.dump(file_new_json, new_file_data, indent=4)
      elif is_on==&quot;True&quot;:
          pass
  </code></pre>
  <p>my json file :-
  {
  &quot;1&quot;: {
  &quot;name&quot;: &quot;hjghjghj&quot;,
  &quot;weaver&quot;: &quot;hygjghyghj&quot;,
  &quot;qty&quot;: 1,
  &quot;image&quot;: &quot;C:/Users/mayru/Desktop/file/41+lVas4jtL.bmp&quot;,
  &quot;date_time&quot;: &quot;29/05/2022 19:53:35&quot;
  },
  &quot;2&quot;: {
  &quot;name&quot;: &quot;o[op[&quot;,
  &quot;weaver&quot;: &quot;p[;oip&quot;,
  &quot;qty&quot;: 1,
  &quot;image&quot;: &quot;C:/Users/mayru/Desktop/file/10 (1).jpg&quot;,
  &quot;date_time&quot;: &quot;29/05/2022 19:54:18&quot;
  }
  }</p>
  <p>also yesterday it worked fine but today its showing this issue :-</p>
  <pre><code>[
      null,
      {
          &quot;date_time&quot;: &quot;29/05/2022 19:53:35&quot;,
          &quot;image&quot;: &quot;C:/Users/mayru/Desktop/file/41+lVas4jtL.bmp&quot;,
          &quot;name&quot;: &quot;hjghjghj&quot;,
          &quot;qty&quot;: 1,
          &quot;weaver&quot;: &quot;hygjghyghj&quot;
      },
      {
          &quot;date_time&quot;: &quot;29/05/2022 19:54:18&quot;,
          &quot;image&quot;: &quot;C:/Users/mayru/Desktop/file/10 (1).jpg&quot;,
          &quot;name&quot;: &quot;o[op[&quot;,
          &quot;qty&quot;: 1,
          &quot;weaver&quot;: &quot;p[;oip&quot;
      }
  ]
  </code></pre>
  <p>thanks for your help</p>