title: AttributeError: function/symbol 'ARC4_stream_init' not found in library (Python)
body: <p>I've been trying to use multiple different pdf to text libraries such as pdfplumber and pdfminer, both give me this same traceback error that I am missing ARC4_stream_init. I tried googling but I couldn't find anyone with a similar issue. Any help would be appreciated:</p>
  <p>Edit: originally I was trying to extract a financial statement pdf that might be encrypted. I just tried a simpler pdf and there was no issue. I'd still appreciate any workaround as I am trying to automate data entry of financial statement pdfs.</p>
  <pre><code>Traceback (most recent call last):
  
    File &quot;C:\Users\Stan\Python\ALIRT\pdf extracter\test.py&quot;, line 50, in &lt;module&gt;
      text = convert_pdf_to_txt('test_pdf.pdf')
  
    File &quot;C:\Users\Stan\Python\ALIRT\pdf extracter\test.py&quot;, line 40, in convert_pdf_to_txt
      for page in PDFPage.get_pages(fp, pagenos, maxpages=maxpages, password=password,caching=caching, check_extractable=True):
  
    File &quot;C:\Users\Stan\anaconda3\lib\site-packages\pdfminer\pdfpage.py&quot;, line 127, in get_pages
      doc = PDFDocument(parser, password=password, caching=caching)
  
    File &quot;C:\Users\Stan\anaconda3\lib\site-packages\pdfminer\pdfdocument.py&quot;, line 564, in __init__
      self._initialize_password(password)
  
    File &quot;C:\Users\Stan\anaconda3\lib\site-packages\pdfminer\pdfdocument.py&quot;, line 590, in _initialize_password
      handler = factory(docid, param, password)
  
    File &quot;C:\Users\Stan\anaconda3\lib\site-packages\pdfminer\pdfdocument.py&quot;, line 283, in __init__
      self.init()
  
    File &quot;C:\Users\Stan\anaconda3\lib\site-packages\pdfminer\pdfdocument.py&quot;, line 291, in init
      self.init_key()
  
    File &quot;C:\Users\Stan\anaconda3\lib\site-packages\pdfminer\pdfdocument.py&quot;, line 304, in init_key
      self.key = self.authenticate(self.password)
  
    File &quot;C:\Users\Stan\anaconda3\lib\site-packages\pdfminer\pdfdocument.py&quot;, line 354, in authenticate
      key = self.authenticate_user_password(password)
  
    File &quot;C:\Users\Stan\anaconda3\lib\site-packages\pdfminer\pdfdocument.py&quot;, line 361, in authenticate_user_password
      if self.verify_encryption_key(key):
  
    File &quot;C:\Users\Stan\anaconda3\lib\site-packages\pdfminer\pdfdocument.py&quot;, line 368, in verify_encryption_key
      u = self.compute_u(key)
  
    File &quot;C:\Users\Stan\anaconda3\lib\site-packages\pdfminer\pdfdocument.py&quot;, line 326, in compute_u
      result = ARC4.new(key).encrypt(hash.digest())  # 4
  
    File &quot;C:\Users\Stan\anaconda3\lib\site-packages\Crypto\Cipher\ARC4.py&quot;, line 132, in new
      return ARC4Cipher(key, *args, **kwargs)
  
    File &quot;C:\Users\Stan\anaconda3\lib\site-packages\Crypto\Cipher\ARC4.py&quot;, line 60, in __init__
      result = _raw_arc4_lib.ARC4_stream_init(c_uint8_ptr(key),
  
    File &quot;C:\Users\Stan\anaconda3\lib\site-packages\cffi\api.py&quot;, line 912, in __getattr__
      make_accessor(name)
  
    File &quot;C:\Users\Stan\anaconda3\lib\site-packages\cffi\api.py&quot;, line 908, in make_accessor
      accessors[name](name)
  
    File &quot;C:\Users\Stan\anaconda3\lib\site-packages\cffi\api.py&quot;, line 838, in accessor_function
      value = backendlib.load_function(BType, name)
  
  AttributeError: function/symbol 'ARC4_stream_init' not found in library 'C:\Users\Stan\anaconda3\lib\site-packages\Crypto\Util\..\Cipher\_ARC4.cp37-win_amd64.pyd': error 0x7f
  </code></pre>