Reputation: 21
So I am converting text into speech using pdfplumber for extracting text, but I am getting error.
from cryptography.hazmat.bindings.\_rust import exceptions as rust_exceptions
ImportError: DLL load failed while importing \_rust: The specified procedure could not be found.
Also I asked chat-gpt it tell install rust. Do I really need to download that?
import pdfplumber as pdfplumber
import tkinter as tk
def extract_text_from_pdf(pdf_path):
text = ""
with pdfplumber.open(pdf_path) as pdf:
for page in pdf.pages:
text += page.extract_text()
return text
t = extract_text_from_pdf("game_doc.pdf")
print(t)
Upvotes: 2
Views: 569
Reputation: 8423
I encountered an issue while trying to connect with a Snowflake database, which uses the cryptography package as a dependency. To resolve the problem, I downgraded the cryptography package from version 41.0.8 to 41.0.7.
pip install cryptography==41.0.7
This solution worked for me, and I hope it helps others facing a similar issue.
Upvotes: 1