[Python-Dev] pydoc works with eggs? (python-2.5.1)

Neal Becker ndbecker2 at gmail.com
Wed Apr 23 12:48:03 CEST 2008


Neal Becker wrote:

> pydoc blew up when I tried to view doc for pytools module, which is an
> egg:
> 
> pydoc -p 8082
> pydoc server ready at http://localhost:8082/
> ----------------------------------------
> Exception happened during processing of request from ('127.0.0.1', 52915)
> Traceback (most recent call last):
>   File "/usr/lib64/python2.5/SocketServer.py", line 222, in handle_request
>     self.process_request(request, client_address)
>   File "/usr/lib64/python2.5/SocketServer.py", line 241, in
>   process_request
>     self.finish_request(request, client_address)
>   File "/usr/lib64/python2.5/SocketServer.py", line 254, in finish_request
>     self.RequestHandlerClass(request, client_address, self)
>   File "/usr/lib64/python2.5/SocketServer.py", line 522, in __init__
>     self.handle()
>   File "/usr/lib64/python2.5/BaseHTTPServer.py", line 316, in handle
>     self.handle_one_request()
>   File "/usr/lib64/python2.5/BaseHTTPServer.py", line 310, in
>   handle_one_request
>     method()
>   File "/usr/lib64/python2.5/pydoc.py", line 1924, in do_GET
>     self.send_document(describe(obj), html.document(obj, path))
>   File "/usr/lib64/python2.5/pydoc.py", line 321, in document
>     if inspect.ismodule(object): return self.docmodule(*args)
>   File "/usr/lib64/python2.5/pydoc.py", line 672, in docmodule
>     contents.append(self.document(value, key, name, fdict, cdict))
>   File "/usr/lib64/python2.5/pydoc.py", line 322, in document
>     if inspect.isclass(object): return self.docclass(*args)
>   File "/usr/lib64/python2.5/pydoc.py", line 807, in docclass
>     lambda t: t[1] == 'method')
>   File "/usr/lib64/python2.5/pydoc.py", line 735, in spill
>     funcs, classes, mdict, object))
>   File "/usr/lib64/python2.5/pydoc.py", line 323, in document
>     if inspect.isroutine(object): return self.docroutine(*args)
>   File "/usr/lib64/python2.5/pydoc.py", line 891, in docroutine
>     getdoc(object), self.preformat, funcs, classes, methods)
>   File "/usr/lib64/python2.5/pydoc.py", line 79, in getdoc
>     result = inspect.getdoc(object) or inspect.getcomments(object)
>   File "/usr/lib64/python2.5/inspect.py", line 521, in getcomments
>     lines, lnum = findsource(object)
>   File "/usr/lib64/python2.5/inspect.py", line 510, in findsource
>     if pat.match(lines[lnum]): break
> IndexError: list index out of range
> ----------------------------------------
> 
I see that installing the egg unzipped fixes this.  It looks to me that
pydoc doesn't work with zipped eggs.



More information about the Python-Dev mailing list