DarkShadowTNT created this task.
Herald added subscribers: pywikibot-bugs-list, Zppix, Aklapper.

TASK DESCRIPTION
  When I try to use ##interwiki.py##, it collects all the pages that it'll 
edit, but at the end, when (I assume so) it wants to save the pages, it fails 
to do so.
  
  What I expected to happen
  -------------------------
  
  It saves the selected pages.
  
  What happend
  ------------
  
  It gives me a couple of warnings which states that interwiki X is not linked 
to interwiki Y, that interwiki Z is not linked to interwiki Y, that interwiki Y 
is not linked to interwiki X, etc.
  
  How to reproduce
  ----------------
  
  1. Get the Pywikibot version from 
http://tools.wmflabs.org/pywikibot/core_stable.zip
  2. Run the script for creating ##user-config.py## and maybe to create a 
family file (only when reproducing doesn't work with the families that are 
included in the download).
  3. Login using ##login.py##.
  4. Use ##interwiki.py## (adding a page name is optional).
  
  You'll see that, at the end, under ##====== Post-processing [[interwiki]] 
======##, it gives a couple of warnings and won't try to edit and save the page.
  
  Some code stuff
  ---------------
  
  It looks like it gets stuck on this piece of code which starts at line 2071 
and ends at line 2087 (not sometimes, but every time):
  
    linkedPagesDict = {}
    for linkedPage in linkedPages:
        linkedPagesDict[linkedPage.site] = linkedPage
    for expectedPage in expectedPages - linkedPages:
        if expectedPage != page:
            try:
                linkedPage = linkedPagesDict[expectedPage.site]
                pywikibot.output(
                    u"WARNING: %s: %s does not link to %s but to %s"
                    % (page.site.family.name,
                       page, expectedPage, linkedPage))
            except KeyError:
                if not expectedPage.site.is_data_repository():
                    pywikibot.output(
                        u"WARNING: %s: %s does not link to %s"
                        % (page.site.family.name,
                           page, expectedPage))
  
  When this happens, I get in Command Prompt this output (<username> stands for 
the account I'm currently using, don't want to put my name here):
  
    C:\Users\<username>\Documents\pywikibot\core_stable>interwiki.py Alpha_1.0.1
    Retrieving 1 pages from minecraft:nl.
    [[nl:Alpha 1.0.1]]: [[nl:Alpha 1.0.1]] gives new interwiki [[en:Alpha 
1.0.1]]
    [[nl:Alpha 1.0.1]]: [[nl:Alpha 1.0.1]] gives new interwiki [[ru:Alpha 
1.0.1]]
    Retrieving 1 pages from minecraft:ru.
    Retrieving 1 pages from minecraft:en.
    ======Post-processing [[nl:Alpha 1.0.1]]======
    WARNING: minecraft: [[ru:Alpha 1.0.1]] does not link to [[nl:Alpha 1.0.1]]
    WARNING: minecraft: [[en:Alpha 1.0.1]] does not link to [[ru:Alpha 1.0.1]]
  
  Details
  -------
  
  - The Wiki I try to edit is http://minecraft-nl.gamepedia.com and all the 
other languages which are part of that Wiki group. As you might've seen in the 
output, not all the Wikis have every page the English Wiki has (which is also 
the base Wiki).
    - Even though it's a third-party Wiki, some users use Pywikibot as bot 
software. It looks like they don't have this issue (maybe an older version of 
Pywikibot?).
  - Python version 2.7.11.
  - The bot is logged in.
    - Doesn't have bot rights yet. I want to test it first before even asking 
for those rights.
  - I tried to use a (newer?) version from Github (link: 
https://github.com/wikimedia/pywikibot-core/), but that failed because it needs 
a so-called 'ListOption' and 'StandardOption' which are, according to the code, 
stored in pywikibot\bot.
    - I tried after that to search for the folder 'bot' in the Github of 
Pywikibot. I haven't found it (yet).
  - Pywikibot is downloaded from 
http://tools.wmflabs.org/pywikibot/core_stable.zip
  - Operating system: Windows 10, version ##10.0.10586##.

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

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

To: DarkShadowTNT
Cc: Aklapper, Zppix, DarkShadowTNT, pywikibot-bugs-list, Mdupont, jayvdb



_______________________________________________
pywikibot-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs

Reply via email to