Skip to content

character encoding errors in report_ftk_extents.py #32

Open

Description

@dreyjo

When running report_ftk_extents.py, if there is a character encoding error in the xml being transformed, lxml (a dependency for the script throughs a syntax error. Tried to run report_ftk_extents.py with an xml file that had a character encoding issue and received the following error:

Traceback (most recent call last):
File "/mnt/c/Users/foren/Documents/report_ftk_extents.py", line 271, in
main()
File "/mnt/c/Users/foren/Documents/report_ftk_extents.py", line 256, in main
tree = etree.parse(args.file)
File "src/lxml/etree.pyx", line 3541, in lxml.etree.parse
File "src/lxml/parser.pxi", line 1879, in lxml.etree._parseDocument
File "src/lxml/parser.pxi", line 1905, in lxml.etree._parseDocumentFromURL
File "src/lxml/parser.pxi", line 1808, in lxml.etree._parseDocFromFile
File "src/lxml/parser.pxi", line 1180, in lxml.etree._BaseParser._parseDocFromFile
File "src/lxml/parser.pxi", line 618, in lxml.etree._ParserContext._handleParseResultDoc
File "src/lxml/parser.pxi", line 728, in lxml.etree._handleParseResult
File "src/lxml/parser.pxi", line 657, in lxml.etree._raiseParseError
File "/mnt/f/FTKsettings/extents_reports/M24575report/Report.xml", line 72
lxml.etree.XMLSyntaxError: PCDATA invalid Char value 31, line 72, column 9527

Activity

  1. nkrabben commented on Jan 16, 2024

    @nkrabben
    Collaborator

    Did we ever address this? I remember analyzing this file, but wasn't sure if we updated the script or decided to edit the source file.

    Might be good to create a test with an encoding issue.

  2. dreyjo commented on Jan 26, 2024

    @dreyjo
    ContributorAuthor

    Tried running the script with the xml report from M24575 (the collection where this error came up) and the error persists. For more detail, the encoding error is in the name of the filesystem in the file paths from floppy disk 0084 which in the xml renders as "ƒ°?°0#9;�≡╟ #7; [FAT12]". I believe I edited this title in the xml to deliver extents previously but made no changes to the script.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions