ITADN

Running into non-fatal error when parsing some rtf readmes

#99ClosedProjectSynchro 创建于 2024-04-15
P
ProjectSynchrocommented
When installing: https://deadlystream.com/files/file/312-gaffi-stick-improvement/ It looks like some of the bits of the rtf README are throwing parsing errors in HoloPatcher, this is benign as far as I can tell, but interrupts an automated install (like with KOTORModSync). Here's the stack trace: let me know if I can give you anything else :) ```python An unexpected error occurred while loading the patcher namespace. Exception ''utf-8' codec can't decode byte 0xbb in position 36: invalid start byte' of type '<class 'UnicodeDecodeError'>' occurred. Stack Trace Variables: Function 'on_namespace_option_chosen' at /tmp/_MEI9fHypt/__main__.py:863: self = App( browse_button=<tkinter.ttk.Button object .!frame.!button>, exit_button=<tkinter.ttk.Button object .!frame4.!button>, expand_namespace_description_button=<tkinter.ttk.Button object .!frame.!button2>, gamepaths=<tkinter.ttk.Combobox object .!frame.!combobox2>, gamepaths_browse_button=<tkinter.ttk.Button object .!frame.!button3>, install_button=<tkinter.ttk.Button object .!frame4.!button2>, install_running=False, log_file_path=PosixPath(/home/synchro/Games/Modding/kotormods...<truncated> event = Event( <tkinter.Event object at 0x7fa0328a3aa0> config_reader = ConfigReader( config=PatcherConfig( confirm_message='N/A', game_number=1, ignore_file_extensions=False, install_list=[], log_level=<LogLevel.WARNINGS: 3>, patches_2da..., ini=ConfigParser( BOOLEAN_STATES={'1': True, 'yes': True, 'true': True, 'on': True, '0': False, 'no': False, 'false': False, 'off': False}, NONSPACECRE=re.compile('\\S'), OPTCR..., log=PatchLogger( all_logs=[<pykotor.tslpatcher.logger.PatchLog object at 0x7fa0328a3b90>], error_observable=Observable( callbacks=[] ), errors=[], n..., mod_path=CaseAwarePath("//home/synchro/Games/Modding/kotormods/mods/Gaffi Stick Improvement/Gaffi Stick Improvement/tslpatchdata"), previously_parsed_sections={'Settings'} ) namespace_option = PatcherNamespace( DEFAULT_INFO_FILENAME='info.rtf', DEFAULT_INI_FILENAME='changes.ini', data_folderpath=PurePosixPath(.), description='', info_filename='info.rtf', ini_filename='changes.ini', name='Gaffi Stick Improvement - KotOR 1', namespace_id='' ) changes_ini_path = CaseAwarePath("//home/synchro/Games/Modding/kotormods/mods/Gaffi Stick Improvement/Gaffi Stick Improvement/tslpatchdata/changes.ini") reader = ConfigReader( config=PatcherConfig( confirm_message='N/A', game_number=1, ignore_file_extensions=False, install_list=[], log_level=<LogLevel.WARNINGS: 3>, patches_2da..., ini=ConfigParser( BOOLEAN_STATES={'1': True, 'yes': True, 'true': True, 'on': True, '0': False, 'no': False, 'false': False, 'off': False}, NONSPACECRE=re.compile('\\S'), OPTCR..., log=PatchLogger( all_logs=[<pykotor.tslpatcher.logger.PatchLog object at 0x7fa0328a3b90>], error_observable=Observable( callbacks=[] ), errors=[], n..., mod_path=CaseAwarePath("//home/synchro/Games/Modding/kotormods/mods/Gaffi Stick Improvement/Gaffi Stick Improvement/tslpatchdata"), previously_parsed_sections={'Settings'} ) game_number = 1 game = <Game.K1: 1> info_rtf_path = CaseAwarePath("//home/synchro/Games/Modding/kotormods/mods/Gaffi Stick Improvement/Gaffi Stick Improvement/tslpatchdata/info.rtf") info_rte_path = CaseAwarePath("//home/synchro/Games/Modding/kotormods/mods/Gaffi Stick Improvement/Gaffi Stick Improvement/tslpatchdata/info.rte") data = b'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n\xbb Gaffi Stick Improvement ReadMe\r\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\nAUTHOR: Fallen Guardian\r\nNAME: Gaffi Stick Improvement\r\nTYPE: Modification\r\nV... e = UnicodeDecodeError('utf-8', b'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n\xbb Gaffi Stick Improvement ReadMe\r\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\nAUTHOR: Fallen Guardian\r\nNAME: Gaffi Stick Improvemen... Function 'decode_bytes_with_fallbacks' at /tmp/_MEI9fHypt/pykotor/tools/encoding.pyc:61: byte_content = b'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n\xbb Gaffi Stick Improvement ReadMe\r\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\nAUTHOR: Fallen Guardian\r\nNAME: Gaffi Stick Improvement\r\nTYPE: Modification\r\nV... errors = 'strict' encoding = None lang = None only_8bit_encodings = False provided_encoding = 'utf-8' Traceback (most recent call last): File "__main__.py", line 863, in on_namespace_option_chosen File "pykotor/tools/encoding.py", line 61, in decode_bytes_with_fallbacks UnicodeDecodeError: 'utf-8' codec can't decode byte 0xbb in position 36: invalid start byte ```
关闭于 2024-04-20 6 条评论