AttributeError: 'ReadonlyTransportDecorator' with 'bzr serve'

Bug #472657 reported by Parth Malwankar on 2009-11-03
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
loggerhead
Low
Unassigned
loggerhead-breezy
Undecided
Unassigned

Bug Description

I recently installed ubuntu 9.10 and get the following exception with 'bzr serve --http'.

[trunk]% bzr serve --http
serving on 0.0.0.0:8080 view at http://127.0.0.1:8080
----------------------------------------
Exception happened during processing of request from ('127.0.0.1', 35686)
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.6/paste/httpserver.py", line 1068, in process_request_in_thread
    self.finish_request(request, client_address)
  File "/usr/lib/python2.6/SocketServer.py", line 320, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/usr/lib/python2.6/SocketServer.py", line 615, in __init__
    self.handle()
  File "/usr/lib/pymodules/python2.6/paste/httpserver.py", line 442, in handle
    BaseHTTPRequestHandler.handle(self)
  File "/usr/lib/python2.6/BaseHTTPServer.py", line 329, in handle
    self.handle_one_request()
  File "/usr/lib/pymodules/python2.6/paste/httpserver.py", line 437, in handle_one_request
    self.wsgi_execute()
  File "/usr/lib/pymodules/python2.6/paste/httpserver.py", line 287, in wsgi_execute
    self.wsgi_start_response)
  File "/usr/lib/pymodules/python2.6/paste/httpexceptions.py", line 636, in __call__
    return self.application(environ, start_response)
  File "/usr/lib/python2.6/dist-packages/loggerhead/apps/transport.py", line 156, in __call__
    transport = get_transport_for_thread(self.base)
  File "/usr/lib/python2.6/dist-packages/loggerhead/apps/transport.py", line 136, in get_transport_for_thread
    transport = get_transport(base)
  File "/usr/lib/python2.6/dist-packages/bzrlib/transport/__init__.py", line 1553, in get_transport
    base = directories.dereference(base)
  File "/usr/lib/python2.6/dist-packages/bzrlib/directory_service.py", line 54, in dereference
    match = self.get_prefix(url)
  File "/usr/lib/python2.6/dist-packages/bzrlib/registry.py", line 183, in get_prefix
    if fullname.startswith(key):
AttributeError: 'ReadonlyTransportDecorator' object has no attribute 'startswith'
----------------------------------------

Details of my bzr plugins:
[~]% bzr plugins
bzrtools 2.0.1
    Various useful commands for working with bzr.

git 0.4.1dev
    A GIT branch and repository format implementation for bzr.

hg
    Hg support for bzr.

launchpad 2.0.1
    Launchpad.net integration plugin for Bazaar.

loggerhead 1.17.0
    Loggerhead web viewer for Bazaar branches.

netrc_credential_store 2.0.1
    Use ~/.netrc as a credential store for authentication.conf.

search 1.7.0dev
    search is a bzr plugin for searching bzr content.

stats
    A Simple bzr plugin to generate statistics about the history.

svn 1.0.0
    Support for Subversion branches

touch 1.1
    bzr touch

undelete 0.2.0
    Undelete the file(s) deleted using 'bzr rm'

[~]%

I also have python-pygments 1.0 installed from packages.

Have you tried running Loggerhead's trunk branch (lp:loggerhead)? IIRC,
that's what revision 388 fixed.

affects: bzr → loggerhead
Parth Malwankar (parthm) wrote :

In order to run the trunk, I uninstalled existing loggerhead (which was installed from packages) and did 'bzr branch lp:loggerhead' in .bazaar/plugins.
I can't seem to get this to work.

[trunk]% bzr serve --http
bzr: ERROR: No module named loggerhead.apps.branch
You may need to install this Python library separately.
[trunk]%

Crap. That's bug #385281, and I'm not sure how to work around it.

Well, you could install the trunk Loggerhead globally (e.g. at
/usr/local/lib/python2.x/site-packages/loggerhead).

Parth Malwankar (parthm) wrote :

I tried the following three but continue to get the 'No module named loggerhead.apps.branch' error.

[plugins]% sudo ln -s /home/parthm/.bazaar/plugins/loggerhead/loggerhead /usr/local/lib/python2.6/site-packages/
[plugins]% sudo ln -s /home/parthm/.bazaar/plugins/loggerhead /usr/local/lib/python2.6/site-packages/
[plugins]% sudo ln -s /home/parthm/.bazaar/plugins/loggerhead /usr/share/pyshared/bzrlib/plugins

Changed in loggerhead:
status: New → Triaged
importance: Undecided → Low
Jelmer Vernooij (jelmer) on 2018-10-20
Changed in loggerhead-breezy:
status: New → Incomplete
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers