简体   繁体   中英

How do I solve Attribute error in Google Colab

I had written the following code in Google Colab. Earlier it was working fine but now it is showing attribute error('Page' has no attribute 'Rotation Matrix') at the convert line.

Content of Apollo 2019 file-

ORDINARY BUSINESS:

  1. To consider and adopt: a. the audited financial statement of the Company for the financial year ended March 31, 2019, the reports of the Board of Directors and Auditors thereon; and b. the audited consolidated financial statement of the Company for the financial year ended March 31, 2019 and report of Auditors thereon.
  2. To declare dividend of 3.25 per equity share, for the financial year ended March 31, 2019.
  3. To appoint Mr.Robert Steinmetz (DIN: 00178792), who retires by rotation, and being eligible, offers himselfforre-appointment and in this regard to consider and if thought fit, to pass the following resolution as a Special Resolution:- “RESOLVED THAT pursuant to provisions of Section 152 and all other applicable provisions of the Companies Act, 2013 and Regulation 17(1A) of SEBI (Listing Obligations & Disclosure Requirements) Regulations, 2015, and other applicable provisions, if any, (including any statutory modification(s) or re-enactment thereof, for the time being in force), consent of the Members of the Company be and is hereby accorded to re-appoint, Mr. Robert Steinmetz (DIN: 00178792), Director, aged 79 years, who retires by rotation and being eligible offers himself for re-appointment, as a Director of the Company, liable to retire by rotation.”
  4. To appoint a Director in place of Mr. Francesco Gori (DIN: 07413105), who retires by rotation, and being eligible, offers himself for re-appointment.

Please provide any solution if anyone knows.

!pip install python-docx
!pip install pdf2docx

from pdf2docx import Converter
from docx import Document

from google.colab import drive
drive.mount('/content/drive/')

file_name='/content/drive/MyDrive/Colab Notebooks/PDF files/Apollo 2019.pdf'
word_name='Apollo 2019.docx'

cv=Converter(file_name)
cv.convert(word_name)
cv.close()

Element is a base class processing coordinates, so set rotation matrix globally

--> 279 Element.set_rotation_matrix(self.fitz_page.rotationMatrix) 280 281 return raw_layout

AttributeError: 'Page' object has no attribute 'rotationMatrix'

This is the error which I am getting.

This is not a fix, per se. But I went in and commented out the line 279 in the RawPage.py file. After that, pdf2docx still executed properly and returned a file. Good luck

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM