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

TestArchiver doesn't work with RF 7.0 output.xml format. #80

Open
rasjani opened this issue Apr 26, 2024 · 1 comment
Open

TestArchiver doesn't work with RF 7.0 output.xml format. #80

rasjani opened this issue Apr 26, 2024 · 1 comment

Comments

@rasjani
Copy link

rasjani commented Apr 26, 2024

Looks like at least "starttime" and "endtime" attributes are not present anymore in the output.xml and that cause crash like this;

Parsing: 'output.xml'
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.12/bin/testarchiver", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/test_archiver/output_parser.py", line 861, in main
    build_number_cache = parse_xml(output_file, args.format, connection, config, build_number_cache)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/test_archiver/output_parser.py", line 795, in parse_xml
    parser.feed(buffer)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/xml/sax/expatreader.py", line 211, in feed
    self._parser.Parse(data, isFinal)
  File "/Users/sysadmin/build/v3.12.0/Modules/pyexpat.c", line 416, in StartElement
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/xml/sax/expatreader.py", line 327, in start_element
    self._cont_handler.startElement(name, AttributesImpl(attrs))
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/test_archiver/output_parser.py", line 91, in startElement
    self.archiver.begin_status(attrs.getValue('status'), attrs.getValue('starttime'),
                                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/xml/sax/xmlreader.py", line 291, in getValue
    return self._attrs[name]
           ~~~~~~~~~~~^^^^^^
KeyError: 'starttime'

Not holding my breath to get this fixed but pinging @Muusssi nevertheless

@bbornhau
Copy link

bbornhau commented Jul 2, 2024

Hi there,
a bit late to the game, but i just stumbled across the same issue.
You can specify --legacyoutput with your robot command to create the pre V7 format.
That can be imported with testarchiver .
I am also looking into the source code and might tinker around to get a fix done..but nothing promised :)

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