Comments (5)
fixed in 815e20b
from pdf-toc.
I think this is because PyMuPDF has changed the method name of Document.getToC
into Document.get_toc
, as the manual says.
I will release a new version of pdf-toc to fix the issue as soon as I have some spare time. For now, you can manually downgrade the PyMuPDF to an older version. PyMuPDF == 1.18.15
should be working.
from pdf-toc.
When I try using PyMuPDF==1.18.15, the 'Document' object has no attribute 'getToC'
error disappears, but another error occurs. Is there anything I can do with that?
Traceback (most recent call last):
File "/opt/anaconda3/envs/sklearn_38/bin/pdf-toc", line 5, in <module>
from src.main import main
File "/opt/anaconda3/envs/sklearn_38/lib/python3.8/site-packages/src/__init__.py", line 1, in <module>
from .main import main
File "/opt/anaconda3/envs/sklearn_38/lib/python3.8/site-packages/src/main.py", line 6, in <module>
import fitz
File "/opt/anaconda3/envs/sklearn_38/lib/python3.8/site-packages/fitz/__init__.py", line 10, in <module>
from fitz.fitz import *
File "/opt/anaconda3/envs/sklearn_38/lib/python3.8/site-packages/fitz/fitz.py", line 15, in <module>
from . import _fitz
ImportError: dlopen(/opt/anaconda3/envs/sklearn_38/lib/python3.8/site-packages/fitz/_fitz.cpython-38-darwin.so, 2): Symbol not found: ____chkstk_darwin
Referenced from: /opt/anaconda3/envs/sklearn_38/lib/python3.8/site-packages/fitz/_fitz.cpython-38-darwin.so
Expected in: /usr/lib/libSystem.B.dylib
in /opt/anaconda3/envs/sklearn_38/lib/python3.8/site-packages/fitz/_fitz.cpython-38-darwin.so
from pdf-toc.
When I try using PyMuPDF==1.18.15, the
'Document' object has no attribute 'getToC'
error disappears, but another error occurs. Is there anything I can do with that?Traceback (most recent call last): File "/opt/anaconda3/envs/sklearn_38/bin/pdf-toc", line 5, in <module> from src.main import main File "/opt/anaconda3/envs/sklearn_38/lib/python3.8/site-packages/src/__init__.py", line 1, in <module> from .main import main File "/opt/anaconda3/envs/sklearn_38/lib/python3.8/site-packages/src/main.py", line 6, in <module> import fitz File "/opt/anaconda3/envs/sklearn_38/lib/python3.8/site-packages/fitz/__init__.py", line 10, in <module> from fitz.fitz import * File "/opt/anaconda3/envs/sklearn_38/lib/python3.8/site-packages/fitz/fitz.py", line 15, in <module> from . import _fitz ImportError: dlopen(/opt/anaconda3/envs/sklearn_38/lib/python3.8/site-packages/fitz/_fitz.cpython-38-darwin.so, 2): Symbol not found: ____chkstk_darwin Referenced from: /opt/anaconda3/envs/sklearn_38/lib/python3.8/site-packages/fitz/_fitz.cpython-38-darwin.so Expected in: /usr/lib/libSystem.B.dylib in /opt/anaconda3/envs/sklearn_38/lib/python3.8/site-packages/fitz/_fitz.cpython-38-darwin.so
I am not sure what exactly happened here. It seems to be an upstream issue where PyMuPDF is not installed correctly. pymupdf/PyMuPDF#1296 could be related. You can try to reinstall PyMuPDF or update pip before installation.
This could be specific to some older versions of PyMuPDF through. Perhaps the issue will be resolved automatically in the upcoming version of pdf-toc. Let me know if the problem persists then.
from pdf-toc.
Thanks for your help, unfortunately updating pip and reinstalling PyMuPDF didn't fix the issue. Anyway, I'm watching for the upcoming version of pdf-toc. ;)
from pdf-toc.
Related Issues (3)
- Fix Python version (3.2 -> 3.6) HOT 2
- Can't "show" the toc HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pdf-toc.