UnboundLocalError: local variable 'lshw' referenced before assignment

Bug #1857129 reported by Taihsiang Ho
This bug report is a duplicate of:  Bug #1843063: lshw -json output invalid. Edit Remove
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Checkbox Provider - Base
New
Undecided
Rod Smith
Checkbox Provider - SRU
New
Undecided
Unassigned

Bug Description

On some systems we will get this message[1] when running SRU.

Stable PPA is used:
ubuntu@201708-25694:~$ dpkg -l "*plainbox*" "*checkbox*"
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-==================================-========================-============-=======================================================
ii checkbox-ng 1.6.0~ppa~ubuntu19.10.1 all CheckBoxNG test runner
un plainbox <none> <none> (no description available)
ii plainbox-provider-checkbox 0.50.0~ppa~ubuntu19.10.1 amd64 CheckBox provider for PlainBox
ii plainbox-provider-resource-generic 0.42.0~ppa~ubuntu19.10.1 amd64 CheckBox generic resource jobs provider
ii plainbox-provider-sru 1.14.0~ppa~ubuntu19.10.1 all CheckBox SRU jobs provider
ii python3-checkbox-ng 1.6.0~ppa~ubuntu19.10.1 all CheckBoxNG test runner (Python 3 library)
ii python3-checkbox-support 0.43.0~ppa~ubuntu19.10.1 all collection of Python modules used by PlainBox providers
un python3-plainbox <none> <none> (no description available)
ubuntu@201708-25694:~$

Several submission error urls:
 - eoan on 201708-25694 Dell XPS 13 9370
https://certification.canonical.com/hardware/201708-25694/submission/157035/test/150/result/11900834/

  - https://certification.canonical.com/hardware/201708-25694/submission/154095/test/150/result/11663686/

[1]
ERROR:root:Unable to parse JSON: Expecting ',' delimiter: line 24 column 8 (char 588)
Traceback (most recent call last):
  File "/tmp/nest-wb0h8_me.440b17a5ec0d6b6a647c77b4732450c74e22a9f9253d55dd13ad0aa9afafc812/memory_compare", line 138, in <module>
    sys.exit(main())
  File "/tmp/nest-wb0h8_me.440b17a5ec0d6b6a647c77b4732450c74e22a9f9253d55dd13ad0aa9afafc812/memory_compare", line 101, in main
    installed_memory = HumanReadableBytes(get_installed_memory_size())
  File "/tmp/nest-wb0h8_me.440b17a5ec0d6b6a647c77b4732450c74e22a9f9253d55dd13ad0aa9afafc812/memory_compare", line 62, in get_installed_memory_size
    lshw.run(result)
  File "/usr/lib/python3/dist-packages/checkbox_support/parsers/lshwjson.py", line 47, in run
    self._parse_lshw(lshw, result)
UnboundLocalError: local variable 'lshw' referenced before assignment

Tags: taipei-lab
Changed in plainbox-provider-checkbox:
assignee: nobody → Rod Smith (rodsmith)
Revision history for this message
Rod Smith (rodsmith) wrote :

This bug is caused by invalid lshw output, and I don't see any obvious workaround short of a serious re-write of the memory/info test. Others are working on the lshw bug; with any luck a fix will be available before Ubuntu 20.04 is released. If not, we may need to drop or seriously re-work the memory/info test; but with progress being made on the underlying bug, it seems best to wait a bit before committing resources to a workaround. See also bug #1840462, which closely parallels this one.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.