Skip to main content

Notifications

Power Automate - General Discussion
Unanswered

While using Run Python Script Action i am getting error

(0) ShareShare
ReportReport
Posted on by 141

Hi,

While using Run Python Script Action i am getting error.

I am using fitz to get coordinates

 

below is my code

 

import fitz

pdf_document = fitz.open('C:\\New folder\\.pdf')
search_text = 'Confirmed on the date first above written:'
for page in doc:
text_instances = page.search_for(search_text)
for text_instance in text_instances:
x0, y0, x1, y1 = text_instance.bbox
print(f"Page {page_num + 1}:")
print(f"Text: {search_text}")
print(f"Bounding Box: ({x0}, {y0}) - ({x1}, {y1})")

 

Error detail is 

neerajpokh_0-1714763698306.png

can anyone please help, i am stucked with that

@Nived_Nambiar 

  • neerajpokh Profile Picture
    neerajpokh 141 on at
    Re: While using Run Python Script Action i am getting error

    any help please

  • neerajpokh Profile Picture
    neerajpokh 141 on at
    Re: While using Run Python Script Action i am getting error

    Hi @Nived_Nambiar 

    can you please provide any code for same requirement.

     

    Yes I have specified its path in run python script action

    neerajpokh_0-1714978039824.png

     

     

  • Nived_Nambiar Profile Picture
    Nived_Nambiar 17,076 on at
    Re: While using Run Python Script Action i am getting error

    Hi @neerajpokh 

     

    fitz is an external module , have you specified its path in run python script action ?

     

    Thanks & Regards,

    Nived N 🚀

    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel
    Blog: Nived Nambiar's Blogs

    🔍 Found my answer helpful? Please consider marking it as the solution!
    Your appreciation keeps me motivated. Thank you! 🙌

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,508

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,839

Leaderboard