[Bug 1236669] [NEW] Gives unfriendly error message when missing comma in manifest

Robert Ancell robert.ancell at canonical.com
Tue Oct 8 02:36:51 UTC 2013


Public bug reported:

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 <robert.ancell at canonical.com>",
    "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

** Affects: click (Ubuntu)
     Importance: Medium
         Status: New


** Tags: amd64 apport-crash saucy

** Attachment added: "manifest.json"
   https://bugs.launchpad.net/bugs/1236669/+attachment/3865581/+files/manifest.json

** Information type changed from Private to Public

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to click in Ubuntu.
https://bugs.launchpad.net/bugs/1236669

Title:
  Gives unfriendly error message when missing comma in manifest

Status in “click” package in Ubuntu:
  New

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 <robert.ancell at canonical.com>",
      "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

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/click/+bug/1236669/+subscriptions



More information about the foundations-bugs mailing list