Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ValueError: row 24: page number out of range while downloading from blk #73

Closed
mustafa-ad opened this issue Feb 15, 2024 · 1 comment
Closed

Comments

@mustafa-ad
Copy link

Hello, I got this error while downloading from Blinklearning.

Traceback (most recent call last):
File "/home/user/Downloads/Compressed/pdfgrabber-master/main.py", line 271, in
main()
File "/home/user/Downloads/Compressed/pdfgrabber-master/main.py", line 253, in main
downloadbook()
File "/home/user/Downloads/Compressed/pdfgrabber-master/main.py", line 174, in downloadbook
pdfpath = utils.downloadbook(service, token, bookid, books[bookid], progressfun)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/Downloads/Compressed/pdfgrabber-master/utils.py", line 42, in downloadbook
pdf = service.downloadbook(token, bookid, data, progress)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/Downloads/Compressed/pdfgrabber-master/services/blk.py", line 20, in downloadbook
return mcm.downloadbook(token, bookid, data, prorgess, blinklearning_baseurl)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/Downloads/Compressed/pdfgrabber-master/services/mcm.py", line 126, in downloadbook
pdf.set_toc(toc)
File "/home/user/Downloads/Compressed/pdfgrabber-master/.venv/lib/python3.12/site-packages/fitz/utils.py", line 1333, in set_toc
raise ValueError("row %i: page number out of range" % i)
ValueError: row 24: page number out of range

FelixFrog added a commit that referenced this issue Feb 15, 2024
@mustafa-ad
Copy link
Author

Thank you for fixing that, now I receive this with some books:

Traceback (most recent call last):
File "/home/user/Downloads/Compressed/pdfgrabber-master/main.py", line 271, in
main()
File "/home/user/Downloads/Compressed/pdfgrabber-master/main.py", line 253, in main
downloadbook()
File "/home/user/Downloads/Compressed/pdfgrabber-master/main.py", line 174, in downloadbook
pdfpath = utils.downloadbook(service, token, bookid, books[bookid], progressfun)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/Downloads/Compressed/pdfgrabber-master/utils.py", line 42, in downloadbook
pdf = service.downloadbook(token, bookid, data, progress)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/Downloads/Compressed/pdfgrabber-master/services/blk.py", line 20, in downloadbook
return mcm.downloadbook(token, bookid, data, prorgess, blinklearning_baseurl)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/Downloads/Compressed/pdfgrabber-master/services/mcm.py", line 128, in downloadbook
supdf = fitz.Document(stream=files[filename], filetype="pdf")
~~~~~^^^^^^^^^^
KeyError: '"There is a key here I thought it is better to hide it".pdf'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants