This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: pydoc fails to generate html doc
Type: Stage:
Components: Demos and Tools Versions: Python 2.2
process
Status: closed Resolution: duplicate
Dependencies: Superseder:
Assigned To: Nosy List: akuchling, gvanrossum, jvr, mbrierst, mmaster25
Priority: normal Keywords:

Created on 2002-02-08 02:04 by mmaster25, last changed 2022-04-10 16:04 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
pydoc.py mmaster25, 2002-02-08 02:04 fixed pydoc.py module
patch akuchling, 2002-03-19 16:20 Patch from CVS tree to Raj's version
Messages (8)
msg9179 - (view) Author: Raj Kunjithapadam (mmaster25) Date: 2002-02-08 02:04
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.
msg9180 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2002-02-08 21:48
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?
msg9181 - (view) Author: Raj Kunjithapadam (mmaster25) Date: 2002-02-10 02:54
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
msg9182 - (view) Author: Raj Kunjithapadam (mmaster25) Date: 2002-02-10 03:03
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
msg9183 - (view) Author: Just van Rossum (jvr) * (Python triager) Date: 2002-03-10 18:04
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... ;-)
msg9184 - (view) Author: A.M. Kuchling (akuchling) * (Python committer) Date: 2002-03-19 16:20
Logged In: YES 
user_id=11375

Attaching a diff for Raj's modified version of pydoc.py, 
so the changes are clearly visible.


msg9185 - (view) Author: Michael Stone (mbrierst) Date: 2003-02-03 23:20
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.
msg9186 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2003-02-04 01:35
Logged In: YES 
user_id=6380

OK, closing.
History
Date User Action Args
2022-04-10 16:04:57adminsetgithub: 36046
2002-02-08 02:04:43mmaster25create