Frequently asked questions#

How to speed up Pywikibot?
  1. The first time you are using Pywikibot for multiple Wikimedia sites you can run preload_sites script to preload site info quickly.

  2. If you need the content, use PreloadingGenerator with page generators, EntityGenerator for wikibase entities and DequePreloadingGenerator for a DequeGenerator.

  3. If you use GeneratorFactory with your bot and use its getCombinedGenerator method you can set preload=True to preload page content. This is an alternate to the PreloadingGenerator function mentioned above.

  4. Use MySQLPageGenerator if direct DB access is available and appropriate. See also: MySQL

The bot cannot delete pages

Your account needs delete rights on your wiki. If you have setup another account in your user_config use -user Global options to change it. Maybe you have to login first.

ERROR: Unable to execute script because no *generator* was defined.

Using -help option is a good way to find all generators which can be used with that script. You can also find all generator options and filter options at pywikibot.pagegenerators module. See also Page Generators for additional information.

pywikibot.i18n.TranslationError: No English translation has been defined

It can happen due to lack of i18n submodule or files. Update i18n submodule or download these files first. See also: i18n manual.