Traceback (most recent call last):
doc.subset_fonts(verbose=True, fallback=True) # build subset fonts to reduce file size
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "venv\Lib\site-packages\pymupdf\__init__.py", line 7710, in subset_fonts
new_buffer = build_subset(old_buffer, subsets[0], subsets[1])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "venv\Lib\site-packages\pymupdf\__init__.py", line 7562, in build_subset
with open(f"{tmp_dir}/uncfile.txt", "w", encoding='utf8') as unc_file:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: Document.__init__() got an unexpected keyword argument 'encoding'
This issue seems to be caused by the open attr is override in pymupdf.init.py
Description of the bug
raise
How to reproduce the bug
This issue seems to be caused by the open attr is override in pymupdf.init.py
PyMuPDF version
1.26.6
Operating system
Windows
Python version
3.11