Skip to content

docker run exception,KeyError: 'cmap' #676

@jerry-IN

Description

@jerry-IN

Before you asking

  • I have searched the existing issues
  • I spend at least 5 minutes for thinking and preparing
  • I have thoroughly and completely read the wiki.
  • I have carefully checked the issue, and it is unrelated to the network environment.

Environment

version:latest

Describe the bug

2025-02-22 20:18:46 KeyError: 'cmap'
2025-02-22 20:18:46
2025-02-22 20:18:46 ../usr/local/lib/python3.12/site-packages/pymupdf/init.py:276:exception_info(): exception_info:
2025-02-22 20:18:46 ../usr/local/lib/python3.12/site-packages/pymupdf/init.py:277:exception_info(): Traceback (most recent call last):
2025-02-22 20:18:46 File "/usr/local/lib/python3.12/site-packages/pymupdf/utils.py", line 5698, in build_subset
2025-02-22 20:18:46 fts.main(args)
2025-02-22 20:18:46 File "/usr/local/lib/python3.12/site-packages/fontTools/misc/loggingTools.py", line 375, in wrapper
2025-02-22 20:18:46 return func(*args, **kwds)
2025-02-22 20:18:46 ^^^^^^^^^^^^^^^^^^^
2025-02-22 20:18:46 File "/usr/local/lib/python3.12/site-packages/fontTools/subset/init.py", line 3813, in main
2025-02-22 20:18:46 subsetter.subset(font)
2025-02-22 20:18:46 File "/usr/local/lib/python3.12/site-packages/fontTools/subset/init.py", line 3601, in subset
2025-02-22 20:18:46 self._prune_post_subset(font)
2025-02-22 20:18:46 File "/usr/local/lib/python3.12/site-packages/fontTools/subset/init.py", line 3554, in _prune_post_subset
2025-02-22 20:18:46 new_uniranges = font[tag].recalcUnicodeRanges(font, pruneOnly=True)
2025-02-22 20:18:46 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-02-22 20:18:46 File "/usr/local/lib/python3.12/site-packages/fontTools/ttLib/tables/O_S_2f_2.py", line 338, in recalcUnicodeRanges
2025-02-22 20:18:46 for table in ttFont["cmap"].tables:
2025-02-22 20:18:46 ~~~~~~^^^^^^^^
2025-02-22 20:18:46 File "/usr/local/lib/python3.12/site-packages/fontTools/ttLib/ttFont.py", line 461, in getitem
2025-02-22 20:18:46 table = self._readTable(tag)
2025-02-22 20:18:46 ^^^^^^^^^^^^^^^^^^^^
2025-02-22 20:18:46 File "/usr/local/lib/python3.12/site-packages/fontTools/ttLib/ttFont.py", line 468, in _readTable
2025-02-22 20:18:46 data = self.reader[tag]
2025-02-22 20:18:46 ~~~~~~~~~~~^^^^^
2025-02-22 20:18:46 File "/usr/local/lib/python3.12/site-packages/fontTools/ttLib/sfnt.py", line 109, in getitem
2025-02-22 20:18:46 entry = self.tables[Tag(tag)]
2025-02-22 20:18:46 ~~~~~~~~~~~^^^^^^^^^^
2025-02-22 20:18:46 KeyError: 'cmap'

To Reproduce

  1. execute '...'
  2. select '....'
  3. see errors

Expected behavior

No response

Relevant log output


Origin PDF file

No response

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions