Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pydocs module docs server not working on Windows. #58717

Closed
terryjreedy opened this issue Apr 5, 2012 · 10 comments
Closed

Pydocs module docs server not working on Windows. #58717

terryjreedy opened this issue Apr 5, 2012 · 10 comments
Labels
stdlib Python modules in the Lib dir topic-installation type-bug An unexpected behavior, bug, or error

Comments

@terryjreedy
Copy link
Member

BPO 14512
Nosy @loewis, @birkenfeld, @terryjreedy, @ncoghlan, @larryhastings

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2014-03-02.19:34:35.675>
created_at = <Date 2012-04-05.17:07:05.144>
labels = ['library', 'type-bug', 'expert-installation']
title = 'Pydocs module docs server not working on Windows.'
updated_at = <Date 2015-02-16.06:24:00.853>
user = 'https://github.com/terryjreedy'

bugs.python.org fields:

activity = <Date 2015-02-16.06:24:00.853>
actor = 'berker.peksag'
assignee = 'none'
closed = True
closed_date = <Date 2014-03-02.19:34:35.675>
closer = 'loewis'
components = ['Installation', 'Library (Lib)']
creation = <Date 2012-04-05.17:07:05.144>
creator = 'terry.reedy'
dependencies = []
files = []
hgrepos = []
issue_num = 14512
keywords = []
message_count = 10.0
messages = ['157606', '157931', '157936', '209687', '210145', '212580', '212582', '212584', '212585', '213806']
nosy_count = 8.0
nosy_names = ['loewis', 'georg.brandl', 'terry.reedy', 'ncoghlan', 'larry', 'docs@python', 'python-dev', 'Harlquinth']
pr_nums = []
priority = 'normal'
resolution = 'fixed'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue14512'
versions = ['Python 3.3', 'Python 3.4']

@terryjreedy
Copy link
Member Author

3.2.3rc2 and 3.3.0a2, freshly downloaded and installed, Win7, 64 bit
Start Menue/Pythonxx/Module Docs
Brings up tkinter pydoc box.
[open browser] brings up *empty* localhost:7464 window.
Search 'tkinter' and double-click tkinter entry or select and [go to selected] opens empty localhost:7464/tkinter.html window.

This worked sometime last year on earlier 3.2, maybe on xp box.

I thought there might be an issue already, but I searched for 'pydoc' and 'modole docs' and found nothing.

@terryjreedy terryjreedy added docs Documentation in the Doc dir stdlib Python modules in the Lib dir topic-installation type-bug An unexpected behavior, bug, or error labels Apr 5, 2012
@ncoghlan
Copy link
Contributor

Hmm, we changed a few things with the way the back end server for pydoc works in 3.2. I didn't realise there was a Windows shortcut though, and I don't know how it gets generated. It sounds like it is still using the "-g" option, which is now deprecated.

If you run "pydoc -b" from a command line window, does that work correctly?

("-g" should still work as well, even though it's deprecated, but knowing whether or not "-b" is also broken may help diagnose the problem)

@ncoghlan ncoghlan removed the docs Documentation in the Doc dir label Apr 10, 2012
@terryjreedy
Copy link
Member Author

C:\Programs\Python32\Tools\Scripts>..\..\pythonw pydocgui.pyw -b
has the same behavior I described. So does -g.

The shortcut has been part of the Windows installation for many versions. It obviously uses pydocgui.py.

C:\Programs\Python32\Lib>pydoc.py -b
# starts one python.exe process
# prints on the next lines in the command window
Server ready at http://localhost:50695/
Server commands: [b]rowser, [q]uit
server>
# and opens blank localhost:50695 browser window
after asking for permission for python to access local network (which I gave). 'b' at prompt opens another blank window.

C:\Programs\Python32\Lib>pydoc.py -w difflib
#prints
wrote difflib.html
#which it did, looking as expected when opened in browser, with lots of cross-links.

So what it seems is not working in either case is opening the html page in the browser or connecting it to the server.

C:\Programs\Python32\Lib>webbrowser.py python.org
opens the page in *Internet Explorer* rather than Firefox (my default browser). pydoc tried to connect to the server in a new FF tab.

When I re-ran pydoc and tried to open localhost:50695 in IE, it gave me the result of a Bing search (one help forum post), so neither browser can find anything at that url.

@terryjreedy
Copy link
Member Author

On current 3.3.4 and 3.4.0 start menus, clicking Module Docs does nothing that I can see except add a useless entry to the Frequent Programs list.

I think the entry should be removed from the menu until it is made to work. All it does now is frustrate people and make Python look bad.

@Harlquinth
Copy link
Mannequin

Harlquinth mannequin commented Feb 3, 2014

We're also having the same issue here as well - I will delete the shortcut as a temporary fix!

Thanks, Hq.

@loewis
Copy link
Mannequin

loewis mannequin commented Mar 2, 2014

Nick: the menu entry currently launches tools\scripts\pydocgui.pyw, with no command line options.

@python-dev
Copy link
Mannequin

python-dev mannequin commented Mar 2, 2014

New changeset de81e0fe4905 by Martin v. Löwis in branch 'default':
Issue bpo-14512: Launch pydoc -b instead of pydocgui.pyw on Windows.
http://hg.python.org/cpython/rev/de81e0fe4905

@loewis
Copy link
Mannequin

loewis mannequin commented Mar 2, 2014

cherry-picking request in bpo-20834.

I will personally not backport this to 3.3.

@loewis loewis mannequin closed this as completed Mar 2, 2014
@loewis
Copy link
Mannequin

loewis mannequin commented Mar 2, 2014

FTR: the server itself works fine for me. I don't see an empty window, but the proper library index. Terry, if the issue persists for you even after the change to pydoc -b, please submit *another* issue.

@python-dev
Copy link
Mannequin

python-dev mannequin commented Mar 17, 2014

New changeset fa34ea4e9e47 by Martin v. Löwis in branch '3.4':
Issue bpo-14512: Launch pydoc -b instead of pydocgui.pyw on Windows.
http://hg.python.org/cpython/rev/fa34ea4e9e47

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stdlib Python modules in the Lib dir topic-installation type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

2 participants