[Bug 887879] Re: ubiquity crashed with ValueError in raw_decode(): No JSON object could be decoded

Dmitrijs Ledkovs launchpad at surgut.co.uk
Thu Sep 20 23:05:09 UTC 2012


Although it is guarded with try/except, instead of checking for online state it still solves the problem:
revno: 5528
committer: Mario Limonciello <Mario_Limonciello at Dell.com>
branch nick: ubiquity
timestamp: Wed 2012-06-27 19:21:51 -0500
message:
  Don't let oem-config crash from an invalid server return on the timezone
  page.
diff:
=== modified file 'debian/changelog'
--- debian/changelog	2012-06-27 21:46:17 +0000
+++ debian/changelog	2012-06-28 00:21:51 +0000
@@ -4,6 +4,10 @@
   * Only allow a user to proceed on the networking screen if he entered a valid
     password. This prevents a nm dbus exception. (LP: #112211)
 
+  [ Mario Limonciello ]
+  * Don't let oem-config crash from an invalid server return on the timezone
+    page.
+
  -- Stéphane Graber <stgraber at ubuntu.com>  Wed, 27 Jun 2012 17:45:36 -0400
 
 ubiquity (2.11.7) quantal-proposed; urgency=low

=== modified file 'ubiquity/plugins/ubi-timezone.py'
--- ubiquity/plugins/ubi-timezone.py	2012-05-29 23:07:53 +0000
+++ ubiquity/plugins/ubi-timezone.py	2012-06-28 00:21:51 +0000
@@ -176,15 +176,19 @@
                            (text, message.status_code,
                             message.reason_phrase))))
         else:
-            for result in json.loads(message.response_body.data):
-                model.append([result['name'],
-                              result['admin1'],
-                              result['country'],
-                              result['latitude'],
-                              result['longitude']])
-
-            # Only cache positive results.
-            self.geoname_cache[text] = model
+            try:
+                for result in json.loads(message.response_body.data):
+                    model.append([result['name'],
+                                result['admin1'],
+                                result['country'],
+                                result['latitude'],
+                                result['longitude']])
+
+                # Only cache positive results.
+                self.geoname_cache[text] = model
+
+            except ValueError:
+                syslog.syslog('Server return does not appear to be valid JSON.')
 
         self.city_entry.get_completion().set_model(model)


** Also affects: ubiquity (Ubuntu Precise)
   Importance: Undecided
       Status: New

** Also affects: ubiquity (Ubuntu Quantal)
   Importance: Medium
       Status: Triaged

** Changed in: ubiquity (Ubuntu Precise)
       Status: New => Triaged

** Changed in: ubiquity (Ubuntu Precise)
   Importance: Undecided => Medium

** Changed in: ubiquity (Ubuntu Precise)
    Milestone: None => ubuntu-12.04.2

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

Title:
  ubiquity crashed with ValueError in raw_decode(): No JSON object could
  be decoded

Status in “ubiquity” package in Ubuntu:
  Fix Released
Status in “ubiquity” source package in Precise:
  Fix Committed
Status in “ubiquity” source package in Quantal:
  Fix Released

Bug description:
  can not be install. found error code 10 about keyboard layout

  ProblemType: Crash
  DistroRelease: Ubuntu 11.10
  Package: ubiquity 2.8.7
  ProcVersionSignature: Ubuntu 3.0.0-12.20-generic 3.0.4
  Uname: Linux 3.0.0-12-generic i686
  ApportVersion: 1.23-0ubuntu3
  Architecture: i386
  CasperVersion: 1.287
  Date: Wed Nov  9 06:34:14 2011
  ExecutablePath: /usr/lib/ubiquity/bin/ubiquity
  InterpreterPath: /usr/bin/python2.7
  LiveMediaBuild: Ubuntu 11.10 "Oneiric Ocelot" - Release i386 (20111012)
  ProcCmdline: /usr/bin/python /usr/lib/ubiquity/bin/ubiquity --only
  ProcEnviron: Error: [Errno 13] Permission denied: '/proc/4163/environ'
  PythonArgs: ['/usr/lib/ubiquity/bin/ubiquity', '--only']
  SourcePackage: ubiquity
  Title: ubiquity crashed with ValueError in raw_decode(): No JSON object could be decoded
  UpgradeStatus: No upgrade log present (probably fresh install)
  UserGroups:

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




More information about the foundations-bugs mailing list