Manual talk:Pywikibot/clean


Content is now mandatory in some languages although it could not[edit]

We simply could return the English template by default, instead of getting the following errors when the "-text" parameter is missing and the language template undefined in the script (content = {...}).

Error 'NoneType' is not iterable[edit]

For a few months this script returns systematically the same error on every sites, even when Pywikipedia is up-to-date:

Preparing to process sandbox page [[Wiktionnaire:Bac à sable]]
Traceback (most recent call last):
  File "", line 251, in <module>
  File "", line 245, in main
  File "", line 183, in run
    subst = 'subst:' in translatedContent
TypeError: argument of type 'NoneType' is not iterable


ERROR: No content is given for pages, exiting.
Traceback (most recent call last):
  File "core/", line 262, in <module>
    if not main():
  File "core/", line 255, in main
    run_python_file(filename, [filename] + args, argvu, file_package)
  File "core/", line 121, in run_python_file
  File "core/scripts/", line 272, in <module>
  File "core/scripts/", line 267, in main
    bot = SandboxBot(generator=generator, **opts)
  File "core/scripts/", line 145, in __init__
    raise RuntimeError
<type 'exceptions.RuntimeError'>
CRITICAL: Closing network session.

JackPotte (talk) 10:00, 1 July 2017 (UTC)Reply[reply]