Opened 11 years ago

Closed 18 months ago

#37105 closed defect (fixed)

pydoc2.7 -g fails due to a Tkinter error

Reported by: victor.glazer@… Owned by: jmroot (Joshua Root)
Priority: Normal Milestone:
Component: ports Version: 2.1.2
Keywords: Cc: mww@…, petrrr, chrstphrchvz (Christopher Chavez)
Port: python27 py-tkinter tk

Description

pydoc -g fails for me with the following error:

Exception in thread Thread-1:
Traceback (most recent call last):
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 551, in __bootstrap_inner
    self.run()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 504, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pydoc.py", line 2081, in serve
    DocServer(port, callback).serve_until_quit()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pydoc.py", line 2063, in __init__
    self.base.__init__(self, self.address, self.handler)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 409, in __init__
    self.server_activate()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pydoc.py", line 2074, in server_activate
    if self.callback: self.callback(self)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pydoc.py", line 2164, in ready
    text='Python documentation server at\n' + server.url)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk/Tkinter.py", line 1202, in configure
    return self._configure('configure', cnf, kw)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk/Tkinter.py", line 1193, in _configure
    self.tk.call(_flatten((self._w, cmd)) + self._options(cnf))
TclError: out of stack space (infinite loop?)

I am running version 2.1.2 of MacPorts on OS X 10.6.8:

sudo port version
Version: 2.1.2
uname -a
Darwin Victors-MacBook-Pro.local 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun  7 16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386 i386

I have the following versions of python27, py27-tkinter and tk installed:

sudo port installed python27 py27-tkinter tk
The following ports are currently installed:
  py27-tkinter @2.7.3_0 (active)
  python27 @2.7.3_1+universal (active)
  tk @8.5.13_0+quartz (active)

Poking around online suggests that compiling tk from source with --enable-threads might resolve the issue, but is there a better way?

Thank you for your help.

Change History (7)

comment:1 Changed 11 years ago by jmroot (Joshua Root)

Cc: jwa@… mww@… added

comment:2 Changed 8 years ago by petrrr

Cc: petr@… added

Cc Me!

comment:3 Changed 8 years ago by petrrr

Cc: jwa@… removed
Owner: changed from macports-tickets@… to jwa@…

comment:4 Changed 5 years ago by chrstphrchvz (Christopher Chavez)

Cc: chrstphrchvz added

comment:5 Changed 5 years ago by chrstphrchvz (Christopher Chavez)

Current maintainer of python27 and py27-tkinter is jmroot; current maintainer of tk is mcalhoun

The tcl +threads variant (for compiling with --enable-threads) has been the default for over 6 years. (tk currently has no +threads variant, and will implicitly build with or without threads based on what tcl was built with.) Assuming this issue can still be reproduced, would something like require_active_variants tcl threads in Tkinter ports be necessary?

comment:6 Changed 5 years ago by mf2k (Frank Schima)

Keywords: python tk pydoc tkinter removed
Owner: changed from jyrkiwahlstedt to jmroot
Port: py-tkinter added; py27-tkinter removed
Status: newassigned

comment:7 Changed 18 months ago by jmroot (Joshua Root)

Resolution: fixed
Status: assignedclosed

Tcl 8.6 should not run out of stack with deep recursion in any case. Please reopen if this is still an issue.

Note: See TracTickets for help on using tickets.