[Python-bugs-list] [ python-Bugs-514627 ] pydoc fails to generate html doc

noreply@sourceforge.net noreply@sourceforge.net
Sat, 09 Feb 2002 19:03:47 -0800


Bugs item #514627, was opened at 2002-02-07 18:04
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=514627&group_id=5470

Category: Python Interpreter Core
Group: Python 2.2
Status: Open
Resolution: None
Priority: 5
Submitted By: Raj Kunjithapadam (mmaster25)
Assigned to: Nobody/Anonymous (nobody)
Summary: pydoc fails to generate html doc

Initial Comment:
pydoc on the python 2.2 distribution fails to generate
html doc(when option -w is given)
Traceback follows

Traceback (most recent call last):
  File "/opt/dump/Python-2.2/Lib/pydoc.py", line 2101, in ?
    if __name__ == '__main__': cli()
  File "/opt/dump/Python-2.2/Lib/pydoc.py", line 2070,
in cli
    writedoc(arg)
  File "/opt/dump/Python-2.2/Lib/pydoc.py", line 1341,
in writedoc
    object = locate(key, forceload)
  File "/opt/dump/Python-2.2/Lib/pydoc.py", line 1293,
in locate
    parts = split(path, '.')
  File "/opt/dump/Python-2.2/Lib/string.py", line 117,
in split
    return s.split(sep, maxsplit)
AttributeError: 'module' object has no attribute 'split'


On further investigation I was able to fix it.
Attached is the fix.

----------------------------------------------------------------------

>Comment By: Raj Kunjithapadam (mmaster25)
Date: 2002-02-09 19:03

Message:
Logged In: YES 
user_id=452533

the commandline was
$pydoc -w <name of my python sourcefile>
I cannot give you the exact commandline and traceback as
I am unable to get thru my VPN now.
But I am pretty sure that was the commandline.

Refer to [ #514628 ] bug in pydoc on python 2.2 release
in Python - Patches.
--Raj


----------------------------------------------------------------------

Comment By: Raj Kunjithapadam (mmaster25)
Date: 2002-02-09 18:54

Message:
Logged In: YES 
user_id=452533

It happened to me on Redhat Linux 7.1
when I ran pydoc using the -w option to generate html output.

-w invokes the writedoc method and it expects an arg(filename)
instead of the module object returned by imp_load.

I have also submitted a fix for this.
Thanks for following up on this quickly.
--Raj


----------------------------------------------------------------------

Comment By: Guido van Rossum (gvanrossum)
Date: 2002-02-08 13:48

Message:
Logged In: YES 
user_id=6380

I want to believe you, but I cannot reproduce the traceback.
Can you tell me which command line you used to cause the
traceback, and on which operating system?

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=514627&group_id=5470