Gives unfriendly error message when missing comma in manifest

Bug #1236669 reported by Robert Ancell
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
click (Ubuntu)
Fix Released
Medium
Colin Watson

Bug Description

If you miss out a comma in the manifest file click gives you an unfriendly error message:

$ click build .
Traceback (most recent call last):
  File "/usr/bin/click", line 83, in <module>
    sys.exit(main())
  File "/usr/bin/click", line 79, in main
    return mod.run(args)
  File "/usr/lib/python3/dist-packages/click/commands/build.py", line 43, in run
    path = builder.build(".", manifest_path=options.manifest)
  File "/usr/lib/python3/dist-packages/click/build.py", line 203, in build
    self.read_manifest(full_manifest_path)
  File "/usr/lib/python3/dist-packages/click/build.py", line 75, in read_manifest
    self.manifest = json.load(manifest)
  File "/usr/lib/python3.3/json/__init__.py", line 274, in load
    parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
  File "/usr/lib/python3.3/json/__init__.py", line 319, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.3/json/decoder.py", line 352, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.3/json/decoder.py", line 368, in raw_decode
    obj, end = self.scan_once(s, idx)
ValueError: Expecting ',' delimiter: line 5 column 5 (char 97)

The cause was a missing comma after the version field in the manifest file:
{
    "title": "Euchre",
    "description": "A trick taking card game",
    "version": "0.4"
    "name": "com.ubuntu.developer.robert-ancell.euchre",
    "maintainer": "Robert Ancell <email address hidden>",
    "framework": "ubuntu-sdk-13.10",
    "hooks": {
        "ubuntu-tasks": {
            "desktop": "euchre.desktop"
        }
    }
}

ProblemType: Crash
DistroRelease: Ubuntu 13.10
Package: click 0.4.10
ProcVersionSignature: Ubuntu 3.11.0-11.17-generic 3.11.3
Uname: Linux 3.11.0-11-generic x86_64
ApportVersion: 2.12.5-0ubuntu1
Architecture: amd64
CheckboxSubmission: e440e09ef58a53bccc45087674ba6b8e
CheckboxSystem: d00f84de8a555815fa1c4660280da308
Date: Tue Oct 8 15:33:53 2013
ExecutablePath: /usr/bin/click
InstallationDate: Installed on 2011-04-01 (921 days ago)
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Beta amd64 (20110330)
InterpreterPath: /usr/bin/python3.3
MarkForUpload: True
ProcCmdline: /usr/bin/python3 /usr/bin/click build .
PythonArgs: ['/usr/bin/click', 'build', '.']
SourcePackage: click
Title: click crashed with ValueError in raw_decode(): Expecting ',' delimiter: line 5 column 5 (char 97)
UpgradeStatus: Upgraded to saucy on 2011-07-05 (825 days ago)
UserGroups: adm admin cdrom dialout libvirtd lpadmin plugdev sambashare

Related branches

Revision history for this message
Robert Ancell (robert-ancell) wrote :
information type: Private → Public
tags: removed: need-duplicate-check
Changed in click (Ubuntu):
importance: Undecided → Medium
Colin Watson (cjwatson)
Changed in click (Ubuntu):
status: New → Fix Committed
assignee: nobody → Colin Watson (cjwatson)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package click - 0.4.11

---------------
click (0.4.11) saucy; urgency=low

  * Drop --force-missing-framework from PackageKit plugin now that
    /usr/share/click/frameworks/ubuntu-sdk-13.10.framework is in
    ubuntu-sdk-libs.
  * Show a neater error message when a package's framework is not installed
    (LP: #1236671).
  * Show a neater error message when building a package whose manifest file
    cannot be parsed (LP: #1236669).
  * Show a neater error message when running "click install" with
    insufficient privileges (LP: #1236673).
 -- Colin Watson <email address hidden> Fri, 11 Oct 2013 12:07:06 +0100

Changed in click (Ubuntu):
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.