這可能是由于PyMuPDF庫更新導(dǎo)致的,里面的一些函數(shù)名發(fā)生了變化
?文章來源地址http://www.zghlxwxcb.cn/news/detail-498114.html
1.?AttributeError: 'Document' object has no attribute 'pageCount'
將??pageCount改為?page_count
2.?AttributeError: 'Matrix' object has no attribute 'preRotate'
將preRotate改為prerotate
3.AttributeError: 'Page' object has no attribute 'getPixmap'
將getPixmap改為get_pixmap
4.?AttributeError: 'Pixmap' object has no attribute 'writePNG'
將writePNG改為_writeIMG
?文章來源:http://www.zghlxwxcb.cn/news/detail-498114.html
或者直接安裝老版本的這個庫,也能解決一切問題
pip install PyMuPDF==1.19.0 -i https://pypi.tuna.tsinghua.edu.cn/simple
?
?
?
到了這里,關(guān)于AttributeError: ‘Document‘ object has no attribute ‘pageCount‘ PyMuPDF庫的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!