title: Getting TypeError: rndm_json_data_gen() missing 1 required positional argument: 'rangenum'
body: <p><strong>Error message:</strong><br />
  <code>TypeError: rndm_json_data_gen() missing 1 required positional argument: 'rangenum'</code>.</p>
  <p>I don't see what is missing. I have looked at many of the similar threads on stackoverflow, but can't see how anything applies to my situation.</p>
  <p>This code runs first i.e  at terminal, Python <code>handler.py</code>:</p>
  <pre><code>#########################################################
  ##              HANDLER.PY                             ##
  #########################################################
  import psycopg2
  from lib.feeder import Feeder
  from lib.tle import TLE
  from lib.import_data import IMPORTDATA
  from lib.random_json import DATA_GEN
  
  ##TECHNICALLY THIS COMES PRE-LOADED
  conn_string = &quot;database connection&quot;
  
  # print the connection string we will use to connect
  #print(&quot;Connecting to database\n    -&gt;%s&quot; % (conn_string))
  # get a connection, if a connect cannot be made an exception will be raised here
  conn = psycopg2.connect(conn_string)
  
  ##THIS IS THE PART THAT I’M TRYING TO GET TO WORK
  
  TypeProcessor = IMPORTDATA()
  num_json_items = 5
  
  #####Error happens with last item here######
  Feeder(conn).insertOrUpdateItem(&quot;database_table&quot;, TypeProcessor.getDictionary(),
  TypeProcessor.getIds(), TypeProcessor.getModifiedKey(), TypeProcessor.getUpdateOnConflict(),
  DATA_GEN.rndm_json_data_gen(num_json_items))
  
  print(&quot;Import Data complete&quot;)
  '''
  ## Below was what was in the last spot, where the problem is occurring,
  ## before I started changing it to a method
      {&quot;uuid&quot;: &quot;UUID1&quot;, &quot;column1&quot;: &quot;data1&quot;, &quot;column2&quot;: data2, &quot;column3&quot;: &quot;data3&quot;, \
      &quot;column4&quot;: &quot;data4&quot;, &quot;file_name&quot;: &quot;filename&quot;, &quot;load_date&quot;: &quot;2020-12-09&quot;}
  </code></pre>
  <hr />
  <pre><code>#########################################################
  ##              IMPORT_DATA.PY                         ##
  #########################################################
  
  modified_key = &quot;load_date&quot;
  update_on_conflict = True
  ids = [&quot;uuid&quot;]
  dictionary = {
      &quot;uuid&quot;: {&quot;input_field&quot;: &quot;uid&quot;, &quot;update_on_conflict&quot;: False},
      &quot;column1&quot;: {&quot;input_field&quot;: &quot;column1&quot;, &quot;update_on_conflict&quot;: True},
      &quot;column2&quot;: {&quot;input_field&quot;: &quot;column2&quot;, &quot;update_on_conflict&quot;: True},
      &quot;column3&quot;: {&quot;input_field&quot;: &quot;column3&quot;, &quot;update_on_conflict&quot;: True},
      &quot;column4&quot;: {&quot;input_field&quot;: &quot;column4&quot;, &quot;update_on_conflict&quot;: True},
      &quot;load_date&quot;: {&quot;input_field&quot;: &quot;load_date&quot;, &quot;update_on_conflict&quot;: True}
      };
  
  class IMPORTDATA():
  
      def getDictionary(self):
          return dictionary;
  
      def getIds(self):
          return ids;
  
      def getModifiedKey(self):
          return modified_key;
  
      def getUpdateOnConflict(self):
          return modified_key;
  </code></pre>
  <hr />
  <pre><code>###############################################
  ##            RANDOM_JSON.PY                 ##
  ###############################################
  
  import json
  from faker import Faker
  import random
  from random import randint
  from datetime import datetime
  
  class DATA_GEN():
  def rndm_json_data_gen(self,rangenum):
      fake = Faker()
      Faker.seed(0)
      for _ in range(rangenum):
          import_data={
              &quot;uuid&quot;: fake.bothify(text='UUUID##########'),\
              &quot;column1&quot;: fake.bothify(text='Data##'), \
              &quot;column2&quot;: fake.bothify(text='##'), \
              &quot;column3&quot;: fake.bothify(text='##'), \
              &quot;file_nm&quot;: fake.file_name(), \
              “import_date”: datetime.today().strftime('%Y-%m-%d-%H:%M:%S')
          }
          return import_data;
  </code></pre>