Dalba claimed this task.
Dalba added a comment.

$ python pwb.py scripts/imagecopy.py
Traceback (most recent call last):
  File "pwb.py", line 264, in <module>
    if not main():
  File "pwb.py", line 257, in main
    run_python_file(filename, [filename] + args, argvu, file_package)
  File "pwb.py", line 121, in run_python_file
    main_mod.__dict__)
  File ".\scripts\imagecopy.py", line 396, in <module>
    class TkdialogIC(Tkdialog):
TypeError: NoneType takes no arguments
<class 'TypeError'>
CRITICAL: Closing network session.

The reason is the following import:

try:
    from pywikibot.userinterfaces.gui import Tkdialog
except ImportError as _tk_error:
    Tkdialog = None

pywikibot.userinterfaces.gui is broken in python 3.6 because it relies on idlelib which has had a major rewrite in this version.

Importing anything from pywikibot.userinterfaces.gui causes import error. Because of this, Tkdialog is None, therefore it cannot be subclassed. Hence the error: `TypeError: NoneType takes no arguments.
`
As a temporary workaround we can assign object to Tkdialog to pass class construction phase.


TASK DETAIL
https://phabricator.wikimedia.org/T164163

EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Dalba
Cc: Aklapper, pywikibot-bugs-list, Dalba, Magul, Tbscho, MayS, Mdupont, JJMC89, Avicennasis, Sn1per, jayvdb, Masti, Alchimista, Rxy
_______________________________________________
pywikibot-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs

Reply via email to