title: TypeError: __init__() takes 1 positional argument but 2 were given (Python multiprocessing with Pytesseract)
body: <p>I'm receiving the error message below when attempting to use Python's <code>multiprocessing</code> library along with <code>pytesseract</code> and <code>pdf2image</code> and I'm not quite sure what it means or how to correct it. Other posts I've seen with a similar output message deal with passing <code>self</code> as an argument within a class's method, but I haven't created a class in this instance.</p>
  <pre><code>C:\Users\erik7&gt;python &quot;C:\Users\erik7\Documents\Python Projects\multiprocess_test2.py&quot;
  0
  Exception in thread Thread-11:
  Traceback (most recent call last):
    File &quot;C:\Users\erik7\AppData\Local\Programs\Python\Python38-32\lib\threading.py&quot;, line 932, in _bootstrap_inner
      self.run()
    File &quot;C:\Users\erik7\AppData\Local\Programs\Python\Python38-32\lib\threading.py&quot;, line 870, in run
      self._target(*self._args, **self._kwargs)
    File &quot;C:\Users\erik7\AppData\Local\Programs\Python\Python38-32\lib\multiprocessing\pool.py&quot;, line 576, in _handle_results
      task = get()
    File &quot;C:\Users\erik7\AppData\Local\Programs\Python\Python38-32\lib\multiprocessing\connection.py&quot;, line 251, in recv
      return _ForkingPickler.loads(buf.getbuffer())
  TypeError: __init__() takes 1 positional argument but 2 were given
  1
  2
  3
  4
  5
  6
  7
  8
  9
  </code></pre>
  <p>My code:</p>
  <pre><code>import pytesseract
  import pdf2image
  import multiprocessing
  
  
  def extract(img, page_num):
      
      print(page_num)
      
      return pytesseract.image_to_osd(img, output_type = pytesseract.Output.DICT)['orientaton']
  
  
  if __name__ == &quot;__main__&quot;:
  
      pdf_path = r&quot;C:/Users/erik7/Documents/Late Scans for Testing/scans_template2.pdf&quot;
      output_fmt = 'jpeg'
      img_dpi = 300
      pop_path = r&quot;C:\Users\erik7\Downloads\poppler-0.90.1\bin&quot;
      output_path = r&quot;C:\Users\erik7\Downloads&quot;
      
      pytesseract.pytesseract.tesseract_cmd = r&quot;C:\Program Files\Tesseract-OCR\tesseract.exe&quot;
      
      converted_path = r&quot;C:\Users\erik7\Downloads\converted_images&quot;
      converted = pdf2image.convert_from_path(pdf_path = pdf_path, fmt = output_fmt, dpi = img_dpi, poppler_path = pop_path, output_folder = converted_path, grayscale = True, thread_count = 2)
  
      results = [] 
      
      iterable = [[img, page_num] for page_num, img in enumerate(converted)]
      p = multiprocessing.Pool()
      r = p.starmap(extract, iterable)
      results.append(r)
      p.close()
      
      print(&quot;\n**PROCESS COMPLETED SUCCESSFULLY&quot;)
  </code></pre>