When a document contains a colon or a question mark in the title, Bookworm does not show the table of contents or does not jump to the desired chapter if it shows the table of contents #147
Labels
bug
Something isn't working
Describe the Problem
It's been a long time since I reproduced this issue, I've tried many ways to reproduce the problem with different sizes, pages, and document types, and all the time I've had different results, so I really don't know how to explain in detail the exact problem I'm having, but I'll try to describe.
I had a Georgian document in three formats, pdf, epub and docx, and they all contained a colon and a question mark in the title. Notice I mean the title in the document, not the filename of the document.
When I opened the above mentioned documents, the 64 bit version of Bookworm didn't show any table of contents even though the document contained chapters, but the 32 bit version showed the table of contents as it was in the document, but when I clicked on the chapter I needed to jump to, Bookworm only jumped to the first page of the document and the initial letter, not to a specific chapter.
I later removed from both versions the "database" and "saved data" folders that are stored in the bookworm's user configuration and the 64 bit version showed the table of contents as expected, but still didn't jump to the pressed chapter and moved to the top of the page, as in the 32-bit version.
When I removed the colon from the document name, the 64-bit version of Bookworm showed the table of contents without any problems and jumped to the desired chapter when clicked, but now the 32-bit version did not show the table of contents, but when I again removed the above folders from the 32-bit version of the user configuration, it showed and jumped to the desired chapter.
After several attempts, the .docx document type opened without problems and also jumped to the right chapter of the document in both versions, but this problem seriously affects the .epub and .pdf files.
The Debug mode log shows only
these lines
ERROR - bookworm.bookworm.bootstrap - 30/03/2022 13:17:46 - MainThread (6092): Invalid or unknown document uri: nul
Traceback (most recent call last):
File "bookworm\bootstrap.py", line 72, in _open_arg_file
File "bookworm\document\uri.py", line 117, in from_base64_encoded_string
File "base64.py", line 133, in urlsafe_b64decode
File "base64.py", line 87, in b64decode
binascii.Error: Incorrect padding
Also, I want to note that when Bookworm didn't show the table of contents, the keyboard shortcut for closing, i.e. ctrl+w, also didn't work, and I had to press alt+f, then e, to close, but that also didn't work, and I had to press twice quickly to close the whole program.
To Reproduce
Please note that in all types of documents, file1 is a document that does not contain a colon and a question mark and opens without problems.
Expected behavior
Bookworm should open the document and display the table of contents correctly.
The File You've Opened
Desktop (please complete the following information):
@mush42 Please take a look as this is frustrating when opening documents that have a table of contents. To open such documents, I have to change the title every time.
The text was updated successfully, but these errors were encountered: