0

I'm using a Python script that extracts the text content of a PDF file using pdfplumber.

When running pdfplumber in python I got an error like this

CryptographyDeprecationWarning: Python 3.6 is no longer supported by the Python core team.
Therefore, support for it is deprecated in cryptography and will be removed in a future release.

from cryptography.hazmat.backends import default_backend

This is the python script

import pdfplumber
pdf = pdfplumber.open(file_path)

tables=pdf.pages[0].extract_table()
df = pd.DataFrame(tables[1::],columns=tables[0])

How to solve this error notification? because the python script is still running fine. Will it be a problem if this error is not removed?

  • It's a warning, not an error and it's pretty self-explanatory. Unless you upgrade your version of Python you may not be able to upgrade `cryptography` to the latest version – Iain Shelvington Aug 09 '22 at 01:49

1 Answers1

1

You can supress this message several ways:

  1. Upgrade your python. The most acceptable way, as the developers of Cryptography write that in future versions, they will stop supporting python 3.6.

  2. Just supress this warning:

    import warnings

    from cryptography.utils import CryptographyDeprecationWarning warnings.filterwarnings("ignore", category=CryptographyDeprecationWarning)