jsvine / pdfplumber

Plumb a PDF for detailed information about each char, rectangle, line, et cetera — and easily extract text and tables.
MIT License
6.31k stars 647 forks source link

Getting 'pdfplumber' has no attribute 'open' Error in latest version. #765

Closed Mayank-21 closed 1 year ago

Mayank-21 commented 1 year ago

Describe the bug

Getting 'pdfplumber' has no attribute 'open' error. I am using latest version of pdfplumber

Code to reproduce the problem

import pdfplumber with pdfplumber.open('eng_cr_2022.pdf') as pdfplum: first_page = pdfplum.pages[0] print(first_page.chars[0])

Expected behavior

it should run and give me extracted text.

Actual behavior

Getting Error: AttributeError: partially initialized module 'pdfplumber' has no attribute 'open' (most likely due to a circular import)

Screenshots

If applicable, add screenshots to help explain your problem.

Environment

samkit-jain commented 1 year ago

Hi @Mayank-21 Could you please share how you installed pdfplumber? And is the error happening when you try reinstalling as well? Or maybe downgrading a version?

jsvine commented 1 year ago

Closing stale issue, and because probably not a pdfplumber bug. Feel free to reopen with further documentation 👍