blindpandas / bookworm

The Universally Accessible document Reader
https://getbookworm.com
Other
122 stars 38 forks source link

Bookworm showing number instead of correct heading level formatting in epub files #151

Open DraganRatkovich opened 2 years ago

DraganRatkovich commented 2 years ago

I know again that the title of the question is a little tricky when it gets read, but I'll try to explain the specific problem in as much detail as possible.

Describe the Problem

When opening an epub file that contains heading level 1 formatting to list book chapters, Bookworm, sometimes, only shows numbers instead of heading formatting. To be more precise, in the places, where the screen reader should say "Heading level 1" and the text of the chapter, it only says 1. This problem occurs periodically and after a while, it resolves itself again. Sometimes, the documents that I opened and were properly formatted and also displayed without errors in Bookworm, after a while, these documents also did not display the heading formatting correctly and only displayed the number instead of the heading formatting. During a bug where Bookworm only shows a number instead of the correct formatting, the H also doesn't move to the correct heading and there is no heading in the document, but the table of contents shows the chapters without problems and when you click any of the chapters, the Bookworm jumps to the right chapter, but again, there is no heading formatting, and only the number 1 is displayed. This issue only occurs with epub files, a Word document, that is also formatted with a heading level 1 displays without problems.

To Reproduce

Actually, not sure because this problem only occurs intermittently, but just open the epub file and see the result. There is nothing special to say, because, perhaps, the problem does not even arise for someone.

Expected behavior

Bookworm should display heading formatting without errors in epub files, just like in Word documents.

Desktop (please complete the following information):

Additional context

@mush42 I know you don't have much time these days, but please, consider tackling this issue when you have free time.

DraganRatkovich commented 2 years ago

@mush42 Interestingly, the following log errors were found in debug mode

error.commandline log

ERROR - bookworm.bookworm.bootstrap - 25/04/2022 13:11:18 - MainThread (3296): 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

WX log

babel\dates.py:161: PytzUsageWarning: The normalize method is no longer necessary, as this time zone supports the fold attribute (PEP 495). For more details on migrating to a PEP 495-compliant implementation, see https://pytz-deprecation-shim.readthedocs.io/en/latest/migration.html Traceback (most recent call last): File "win32com\client\gencache.py", line 236, in GetModuleForCLSID ModuleNotFoundError: No module named 'win32com.gen_py.C866CA3A-32F7-11D2-9602-00C04F8EE628x0x5x4.ISpeechObjectToken' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "bookworm\gui\book_viewer\navigation.py", line 148, in onStructuredNavigation File "bookworm\gui\book_viewer\__init__.py", line 637, in navigate_to_structural_element File "bookworm\speech.py", line 24, in announce File "accessible_output2\outputs\auto.py", line 12, in __init__ File "accessible_output2\outputs\sapi5.py", line 36, in __init__ File "accessible_output2\outputs\sapi5.py", line 43, in _available_voices File "win32com\client\util.py", line 84, in __next__ File "win32com\client\__init__.py", line 502, in _get_good_object_ File "win32com\client\__init__.py", line 491, in _get_good_single_object_ File "win32com\client\__init__.py", line 96, in Dispatch File "win32com\client\__init__.py", line 37, in __WrapDispatch File "win32com\client\gencache.py", line 183, in GetClassForCLSID File "win32com\client\gencache.py", line 244, in GetModuleForCLSID File "win32com\client\makepy.py", line 320, in GenerateChildFromTypeLibSpec ModuleNotFoundError: No module named 'win32com.gen_py.C866CA3A-32F7-11D2-9602-00C04F8EE628x0x5x4.ISpeechObjectToken'

pauliyobo commented 1 year ago

@DraganRatkovich are you still encountering this problem?

DraganRatkovich commented 1 year ago

@DraganRatkovich are you still encountering this problem?

Hi,

@pauliyobo Yes, sometimes.

pauliyobo commented 1 month ago

Hello @DraganRatkovich to this day, I'm still unable to reproduce this issue. Would you be able to provide an example file with which you are encountering the problem? Thank you.