[Python-bugs-list] [ python-Bugs-514627 ] pydoc fails to generate html doc
SourceForge.net
noreply@sourceforge.net
Mon, 03 Feb 2003 17:35:37 -0800
Bugs item #514627, was opened at 2002-02-07 21:04
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=514627&group_id=5470
Category: Demos and Tools
Group: Python 2.2
>Status: Closed
>Resolution: Duplicate
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: Guido van Rossum (gvanrossum)
Date: 2003-02-03 20:35
Message:
Logged In: YES
user_id=6380
OK, closing.
----------------------------------------------------------------------
Comment By: Michael Stone (mbrierst)
Date: 2003-02-03 18:20
Message:
Logged In: YES
user_id=670441
Version 1.68 of pydoc.py fixed this in response to bug #586931.
That bug has been closed, someone should close this one too.
----------------------------------------------------------------------
Comment By: A.M. Kuchling (akuchling)
Date: 2002-03-19 11:20
Message:
Logged In: YES
user_id=11375
Attaching a diff for Raj's modified version of pydoc.py,
so the changes are clearly visible.
----------------------------------------------------------------------
Comment By: Just van Rossum (jvr)
Date: 2002-03-10 13:04
Message:
Logged In: YES
user_id=92689
I can reproduce the traceback by going into the Python
src dir and typing
% pydoc -w Lib/os.py
The problem begins in cli(): writedoc() expects a string
but arg as just been assigned a module by
importfile(arg). I don't understand what's supposed to
happen, but I doubt Raj's patch is the proper solution.
(Not sure how helpful this was, but Skip's cron job is
pretty cool... ;-)
----------------------------------------------------------------------
Comment By: Raj Kunjithapadam (mmaster25)
Date: 2002-02-09 22: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 21: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 16: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:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=514627&group_id=5470