loggerhead needs a hard dependency on simplejson

Bug #586611 reported by Tom Dickson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
loggerhead
Fix Released
Medium
Jelmer Vernooij
loggerhead (Ubuntu)
Fix Released
Undecided
Jelmer Vernooij

Bug Description

I am running Loggerhead 1.17 on an Ubuntu 8.04 server on Bazaar (bzr) 2.1.1.

When I click on the "View revision" link on a branch, it gives me:

(root)/serf : error

An unexpected error occurred whileproccesing the request:

AttributeError: 'module' object has no attribute 'dumps'

Loggerhead 1.17 is a web-based interface for Bazaar branches

The loggerhead.log file says:

INFO:loggerhead./serf:Rendering ErrorUI: 0.048339128494262695 secs, 2747 bytes
DEBUG:paste.httpserver.ThreadPool:Added task (0 tasks queued)
ERROR:loggerhead./serf: exceptions.AttributeError: 'module' object has no attribute 'dumps'
Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/loggerhead/apps/error.py", line 31, in __call__
    return self.application(environ, start_response)
  File "/var/lib/python-support/python2.5/paste/httpexceptions.py", line 632, in __call__
    return self.application(environ, start_response)
  File "/var/lib/python-support/python2.5/paste/deploy/config.py", line 276, in __call__
    return self.app(environ, start_response)
  File "/usr/lib/python2.5/site-packages/loggerhead/apps/transport.py", line 158, in __call__
    return favicon_app(environ, start_response)
  File "/usr/lib/python2.5/site-packages/loggerhead/apps/transport.py", line 118, in __call__
    return self.app_for_bazaar_data(path)(environ, start_response)
  File "/usr/lib/python2.5/site-packages/loggerhead/apps/transport.py", line 124, in __call__
    if path.startswith('/.bzr'):
  File "/usr/lib/python2.5/site-packages/loggerhead/apps/branch.py", line 165, in app
    try:
  File "/usr/lib/python2.5/site-packages/loggerhead/controllers/__init__.py", line 93, in __call__
    vals.update(self.get_values(path, kwargs, headers))
  File "/usr/lib/python2.5/site-packages/loggerhead/controllers/revision_ui.py", line 123, in get_values
    'link_data': simplejson.dumps(link_data),
AttributeError: 'module' object has no attribute 'dumps'
INFO:loggerhead./serf:Getting information for ErrorUI: 0.00052595138549804688 secs
INFO:loggerhead:192.168.0.96 - - [27/May/2010:16:44:44 -0700] "GET /loggerhead/serf/revision/188?start_revid=188 HTTP/1.1" 200 - "http://eng:8080/serf/files" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.3) Gecko/20100423 Ubuntu/10.04 (lucid) Firefox/3.6.3"
INFO:loggerhead./serf:Rendering ErrorUI: 0.048729896545410156 secs, 2747 bytes

Related branches

CVE References

Revision history for this message
KURASHIKI Satoru (lurdan) wrote :

hi,

It seems to be the same case https://answers.launchpad.net/loggerhead/+question/106099.

Indeed, loggerhead needs python-simplejson to show changes,
it would be better loggerhead package depends (not recommends) on python-simplejson.

regards,
--
KURASHIKI Satoru

Martin Pool (mbp)
summary: - AttributeError: 'module' object has no attribute 'dumps'
+ loggerhead needs a hard dependency on simplejson
Revision history for this message
Jelmer Vernooij (jelmer) wrote : Re: [Bug 586611] Re: AttributeError: 'module' object has no attribute 'dumps'

On Fri, 2010-10-08 at 08:23 +0000, KURASHIKI Satoru wrote:
> It seems to be the same case
> https://answers.launchpad.net/loggerhead/+question/106099.
>
> Indeed, loggerhead needs python-simplejson to show changes,
> it would be better loggerhead package depends (not recommends) on python-simplejson.
The upstream loggerhead project tries to support regular json, not just
simplejson. I think either this bug should be fixed upstream, or
upstream loggerhead should drop support for installations without
simplejson. We can then update the package to reflect that.

Cheers,

Jelmer

Revision history for this message
Tom Dickson (8-launchpad-bombcar-com) wrote :

Installing python-simplejson fixed this error for me.

Changed in loggerhead:
status: New → Confirmed
importance: Undecided → High
importance: High → Medium
status: Confirmed → Triaged
Jelmer Vernooij (jelmer)
Changed in loggerhead (Ubuntu):
status: New → Incomplete
Revision history for this message
John A Meinel (jameinel) wrote :

I think we should just Depend python-simplejson and be done with it.

Jelmer Vernooij (jelmer)
Changed in loggerhead:
status: Triaged → Fix Committed
assignee: nobody → Jelmer Vernooij (jelmer)
Changed in loggerhead (Ubuntu):
status: Incomplete → Fix Released
assignee: nobody → Jelmer Vernooij (jelmer)
assignee: Jelmer Vernooij (jelmer) → nobody
William Grant (wgrant)
Changed in loggerhead (Ubuntu):
status: Fix Released → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package loggerhead - 1.18.1-1

---------------
loggerhead (1.18.1-1) unstable; urgency=high

  * Bump python-simplejson from Recommends to Depends, as loggerhead
    breaks with python-json. LP: #586611
  * Switch to dh_python2. Closes: #616876
  * Switch to debhelper 7, drop cdbs.
  * Claim support for Bazaar 2.4.
  * New upstream release.
   + Fixes escaping of filenames in revision views. (CVE-2011-0728)
     LP: #740142

loggerhead (1.18-2) unstable; urgency=low

  * Run the test suite during package build.
 -- Jelmer Vernooij <email address hidden> Mon, 28 Mar 2011 19:19:09 +0000

Changed in loggerhead (Ubuntu):
status: In Progress → Fix Released
Changed in loggerhead:
status: Fix Committed → Fix Released
Jelmer Vernooij (jelmer)
Changed in loggerhead (Ubuntu):
assignee: nobody → Jelmer Vernooij (jelmer)
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.