title: Can't open a PDF file using pdfplumber.open
body: <p>I've been following a YouTube channel called &quot;Pythonic accountant&quot;, and I've been attempting to replicate tutorial 4, which teaches how to extract data from a PDF invoice, but I'm failing. I keep getting an error that I can't figure out how to resolve yet. I'm using anaconda and Jupyter notebooks on OSx. My code looks like this:</p>
  <pre><code>    import requests
      import pdfplumber
  
      def download_file(url):
          local_filename = url.split('/')[-1]
  
          with requests.get(url) as r:
              with open(local_filename, 'wb') as f:
              f.write(r.content)
          
          return local_filename
  
      invoice_url = 'http://www.k-billing.com/example_invoices/professionalblue_example.pdf'
  
      invoice = download_file(invoice_url)
  
      with pdfplumber.open(invoice) as pdf:
          page = pdf.pages[0]
          text = page.extract_text()
  </code></pre>
  <p>In the tutorial, the code runs fine. In my case, I get the following error:</p>
  <pre><code>    ---------------------------------------------------------------------------
      AttributeError                            Traceback (most recent call last)
      &lt;ipython-input-6-de1887236e07&gt; in &lt;module&gt;
      ----&gt; 1 with pdfplumber.open(invoice) as pdf:
            2     page = pdf.pages[0]
            3     text = page.extract_text()
  
      AttributeError: module 'pdfplumber' has no attribute 'open'
  </code></pre>
  <p>I've installed the <code>pdfplumber</code> using <code>pip install</code>. I've searched for this error on the web. I can't figure out what I've done wrong.</p>