Skip to content

AttributeError: 'ArrayObject' object has no attribute 'get' #1979

@mnmtz

Description

@mnmtz

When extracting images from the following PDF, this error is raised:

Error

AttributeError: 'ArrayObject' object has no attribute 'get

Environment

Which environment were you using when you encountered the problem?

$ python -m platform
Windows-10-10.0.22621-SP0

$ python -c "import pypdf;print(pypdf.__version__)"
3.12.2

Code + PDF

This is a minimal example that shows the issue:

reader = PdfReader(file, strict=False)
writer = PdfWriter()

writer.clone_document_from_reader(reader)

for page in writer.pages:

     for img_obj in page.images:
          img_count += 1

Sample PDF:
example_121.pdf

Metadata

Metadata

Assignees

Labels

Has MCVEA minimal, complete and verifiable example helps a lot to debug / understand feature requestsis-bugFrom a users perspective, this is a bug - a violation of the expected behavior with a compliant PDF

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions