[V18.0] PyPDF2 broken on arm64 build
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 30/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- docker, python
- Domain
- devops, infrastructure
Research direction
Start by reproducing the failure in the V18 Docker environment on arm64 and compare it with the V17 Docker environment. Inspect the PyPDF2 PdfFileReader call in enterprise/sign/models/sign_template.py around _get_pdf_number_of_pages, then verify that installing a module with a PDF succeeds without the shown traceback and UserError.
Written by the indexing model from the issue text.
Description
Odoo V18 is broken when installing a module that uses the PyPDF2 library.
Validated this against the V17 docker and it works for that version.
The following traceback appears:
web-1 | Traceback (most recent call last):
web-1 | File "/app/enterprise/sign/models/sign_template.py", line 201, in _check_pdf_data_validity
web-1 | self._get_pdf_number_of_pages(base64.b64decode(datas))
web-1 | File "/app/enterprise/sign/models/sign_template.py", line 168, in _get_pdf_number_of_pages
web-1 | file_pdf = PdfFileReader(io.BytesIO(pdf_data), strict=False, overwriteWarnings=False)
web-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
web-1 | File "/usr/local/lib/python3.12/site-packages/PyPDF2/_reader.py", line 1971, in __init__
web-1 | super().__init__(*args, **kwargs)
web-1 | TypeError: PdfReader.__init__() got an unexpected keyword argument 'overwriteWarnings'
web-1 |
web-1 | During handling of the above exception, another exception occurred:
web-1 |
web-1 | Traceback (most recent call last):
web-1 | File "/app/odoo/odoo/tools/convert.py", line 537, in _tag_root
web-1 | f(rec)
web-1 | File "/app/odoo/odoo/tools/convert.py", line 437, in _tag_record
web-1 | record = model._load_records([data], self.mode == 'update')
web-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
web-1 | File "/app/odoo/odoo/models.py", line 5451, in _load_records
web-1 | records = self._load_records_create([data['values'] for data in to_create])
web-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
web-1 | File "/app/odoo/odoo/models.py", line 5355, in _load_records_create
web-1 | records = self.create(vals_list)
web-1 | ^^^^^^^^^^^^^^^^^^^^^^
web-1 | File "<decorator-gen-66>", line 2, in create
web-1 | File "/app/odoo/odoo/api.py", line 480, in _model_create_multi
web-1 | return create(self, arg)
web-1 | ^^^^^^^^^^^^^^^^^
web-1 | File "/app/enterprise/sign/models/sign_template.py", line 121, in create
web-1 | self._check_pdf_data_validity(attachment.datas)
web-1 | File "/app/enterprise/sign/models/sign_template.py", line 203, in _check_pdf_data_validity
web-1 | raise UserError(_("One uploaded file cannot be read. Is it a valid PDF?"))
web-1 | odoo.exceptions.UserError: One uploaded file cannot be read. Is it a valid PDF?
- Dominant language
- Dockerfile
- Stars
- 1.2k
- Forks
- 1.7k
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from odoo/docker
-
Difficulty 1/5 Under an hour Newbie friendliness 70/100
-
Missing PyJWT ?Open
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
-
Difficulty 3/5 1-2 days Newbie friendliness 65/100
-
Difficulty 3/5 1-2 days Newbie friendliness 65/100
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
Similar issues
-
feature request needs triage
Difficulty 1/5 1-3 hours Newbie friendliness 69/100
-
ci-red code-regression gfx942 platform: Linux platform: Windows post-merge project: hipblaslt
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
ROCm/rocm-libraries#16354 ·
Maintainers usually reply within 2 days
-
area:plugins kind:perf priority:p3 ready
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
Auto-Format Suggestions job fails at setup: reviewdog/action-suggester v1.27.0 uses an action pinned by tagPossibly taken @fgogolli claimed this today. Openarea: ci priority: p2 size: S type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
finos/open-resource-broker#883 ·
Maintainers usually reply within 1 day
-
status/to triage
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day