Page MenuHomePhabricator

Documentation of pywikibot.userinterfaces.gui fails due to missing dependency
Closed, ResolvedPublic

Description

09:58:13 /mnt/jenkins-workspace/workspace/tox-doc-trusty/docs/api_ref/pywikibot.userinterfaces.rst:23: WARNING: autodoc: failed to import module 'pywikibot.userinterfaces.gui'; the following exception was raised:
09:58:13 Traceback (most recent call last):
09:58:13   File "/usr/lib/python3.4/tkinter/__init__.py", line 39, in <module>
09:58:13     import _tkinter
09:58:13 ImportError: No module named '_tkinter'
09:58:13 
09:58:13 During handling of the above exception, another exception occurred:
09:58:13 
09:58:13 Traceback (most recent call last):
09:58:13   File "/mnt/jenkins-workspace/workspace/tox-doc-trusty/.tox/doc/lib/python3.4/site-packages/sphinx/ext/autodoc.py", line 385, in import_object
09:58:13     __import__(self.modname)
09:58:13   File "/mnt/jenkins-workspace/workspace/tox-doc-trusty/pywikibot/userinterfaces/gui.py", line 22, in <module>
09:58:13     import tkinter as Tkinter
09:58:13   File "/usr/lib/python3.4/tkinter/__init__.py", line 41, in <module>
09:58:13     raise ImportError(str(msg) + ', please install the python3-tk package')
09:58:13 ImportError: No module named '_tkinter', please install the python3-tk package

Is it possible to install python3-tk on these machines? If not, we need to look at making this a more optional import so that is can generate stubs for the classes, etc

Event Timeline

jayvdb raised the priority of this task from to Low.
jayvdb updated the task description. (Show Details)
jayvdb added subscribers: jayvdb, Aklapper, Unknown Object (MLST) and 2 others.

Jenkins runs tox -edoc which is set to install deps from docs/requirements-py3.txt

So I guess it is all about adding that missing dep there?

I believe that python3-tk can only be installed at the OS level.

(The reason is it drags in lots of extra OS dependencies which not everyone wants, so Debian split it off to a separate package)

Change 216969 had a related patch set uploaded (by Hashar):
contint: install python3-tk

https://gerrit.wikimedia.org/r/216969

Should be good now. Letting the task open until the patch is merged by SRE

Change 216969 merged by Alexandros Kosiaris:
contint: install python3-tk

https://gerrit.wikimedia.org/r/216969

hashar claimed this task.
hashar added a subscriber: akosiaris.

Thank you @akosiaris . Integration puppetmaster has been rebased properly.