Checkbox SRU failed with "ImportError: No module named html"

Bug #1469106 reported by Po-Hsu Lin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Provider for Plainbox - Canonical Certification (Legacy)
Fix Released
Critical
Sylvain Pineau

Bug Description

ubuntu@200908-3521:/tmp$ cat checkbox.log
Traceback (most recent call last):
  File "/usr/bin/checkbox", line 9, in <module>
    load_entry_point('checkbox-ng==0.20.dev', 'console_scripts', 'checkbox')()
  File "/usr/lib/python3/dist-packages/checkbox_ng/main.py", line 41, in main
    raise SystemExit(CheckboxTool().main(argv))
  File "/usr/lib/python3/dist-packages/plainbox/impl/clitools.py", line 310, in main
    self._parser = self.construct_parser(early_ns)
  File "/usr/lib/python3/dist-packages/plainbox/impl/clitools.py", line 469, in construct_parser
    self.add_subcommands(subparsers, early_ns)
  File "/usr/lib/python3/dist-packages/checkbox_ng/tools.py", line 96, in add_subcommands
    from checkbox_ng.commands.launcher import LauncherCommand
  File "/usr/lib/python3/dist-packages/checkbox_ng/commands/launcher.py", line 32, in <module>
    from checkbox_ng.commands.newcli import CliInvocation2
  File "/usr/lib/python3/dist-packages/checkbox_ng/commands/newcli.py", line 42, in <module>
    from plainbox.impl.exporter.html import HTMLSessionStateExporter
ImportError: No module named html

ubuntu@200908-3521:~$ apt-cache policy checkbox
checkbox:
  Installed: 0.17.10+bzr2832+pkg77+legacy1~ubuntu12.04.1
  Candidate: 0.17.10+bzr2832+pkg77+legacy1~ubuntu12.04.1
  Version table:
 *** 0.17.10+bzr2832+pkg77+legacy1~ubuntu12.04.1 0
        500 http://ppa.launchpad.net/checkbox-dev/ppa/ubuntu/ precise/main amd64 Packages
        100 /var/lib/dpkg/status
     0.13.10 0
        500 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main amd64 Packages
        500 http://archive.ubuntu.com/ubuntu/ precise-updates/main amd64 Packages
     0.13.7 0
        500 http://us.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages
        500 http://archive.ubuntu.com/ubuntu/ precise/main amd64 Packages
ubuntu@200908-3521:~$ apt-cache policy plainbox
plainbox:
  Installed: 0.22+bzr3861+pkg31~ubuntu12.04.1
  Candidate: 0.22+bzr3861+pkg31~ubuntu12.04.1
  Version table:
 *** 0.22+bzr3861+pkg31~ubuntu12.04.1 0
        500 http://ppa.launchpad.net/checkbox-dev/ppa/ubuntu/ precise/main amd64 Packages
        100 /var/lib/dpkg/status
ubuntu@200908-3521:~$ plainbox dev list provider
provider '2013.com.canonical.plainbox:manifest'
provider '2013.com.canonical.plainbox:exporters'
provider '2013.com.canonical.plainbox:categories'
provider '2013.com.canonical.certification:certification-client'
provider '2013.com.canonical.certification:checkbox'
provider '2013.com.canonical.certification:plainbox-resources'

Related branches

Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

With checkbox related upgraded to bzr3861, I encountered the hexr key missing error:

Traceback (most recent call last):
  File "/usr/bin/checkbox", line 9, in <module>
    load_entry_point('checkbox-ng==0.20.dev', 'console_scripts', 'checkbox')()
  File "/usr/lib/python3/dist-packages/checkbox_ng/main.py", line 41, in main
    raise SystemExit(CheckboxTool().main(argv))
  File "/usr/lib/python3/dist-packages/plainbox/impl/clitools.py", line 324, in main
    return self.dispatch_and_catch_exceptions(ns)
  File "/usr/lib/python3/dist-packages/plainbox/impl/clitools.py", line 560, in dispatch_and_catch_exceptions
    return self.dispatch_command(ns)
  File "/usr/lib/python3/dist-packages/plainbox/impl/clitools.py", line 556, in dispatch_command
    return ns.command.invoked(ns)
  File "/usr/lib/python3/dist-packages/checkbox_ng/commands/sru.py", line 235, in invoked
    self.provider_loader, lambda: self.config, ns).run()
  File "/usr/lib/python3/dist-packages/checkbox_ng/commands/sru.py", line 99, in run
    '2013.com.canonical.plainbox::hexr']
KeyError: '2013.com.canonical.plainbox::hexr'

Changed in plainbox-provider-canonical-certification:
assignee: nobody → Sylvain Pineau (sylvain-pineau)
status: New → In Progress
Revision history for this message
Sylvain Pineau (sylvain-pineau) wrote :

It's a genuine bug, the session for the sru command is only created the units from the job_list. All exporter units were missing.
I applied the same fix I did for the service command (see highlevel.py create_session()).

Tested with this submission:

https://certification.canonical.com/hardware/201202-10584/submission/104377/

Changed in plainbox-provider-canonical-certification:
milestone: none → 0.17
Changed in plainbox-provider-canonical-certification:
status: In Progress → Fix Committed
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

It works! Thanks for the quick fix!

Changed in plainbox-provider-canonical-certification:
status: Fix Committed → Fix Released
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.