Last modified: 2013-12-18 14:08:01 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T60188, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 58188 - fixing_redirects.py crashes on [[../]]
fixing_redirects.py crashes on [[../]]
Status: RESOLVED FIXED
Product: Pywikibot
Classification: Unclassified
General (Other open bugs)
compat-(1.0)
All All
: Normal major
: ---
Assigned To: Pywikipedia bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-12-08 20:52 UTC by JAn Dudík
Modified: 2013-12-18 14:08 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description JAn Dudík 2013-12-08 20:52:28 UTC
E:\py>fixing_redirects.py -start:! -family:wikiversity


>>> Acer Aspire One <<<
Getting 6 pages from wikiversity:cs...
Sleeping for 4.6 seconds, 2013-12-08 21:47:35


>>> Acer Aspire One/Kychot <<<
Getting 13 pages from wikiversity:cs...
Sleeping for 5.8 seconds, 2013-12-08 21:47:43
Bad title value '../'
Traceback (most recent call last):
  File "E:\py\fixing_redirects.py", line 231, in <module>
    main()
  File "E:\py\fixing_redirects.py", line 225, in main
    workon(page)
  File "E:\py\fixing_redirects.py", line 176, in workon
    target = page2.getMovedTarget()
  File "E:\py\wikipedia.py", line 3126, in getMovedTarget
    lastmove = gen.next()['move']
  File "E:\py\wikipedia.py", line 7813, in logpages
    raise BadTitle
pywikibot.exceptions.BadTitle
Comment 1 JAn Dudík 2013-12-08 21:02:26 UTC
another crash (unknown reason):

>>> Biofyzika: Úvod <<<
Getting 11 pages from wikiversity:cs...
Traceback (most recent call last):
  File "E:\py\fixing_redirects.py", line 231, in <module>
    main()
  File "E:\py\fixing_redirects.py", line 225, in main
    workon(page)
  File "E:\py\fixing_redirects.py", line 179, in workon
    target = pywikibot.Page(mysite, lastmove['new_title'])
NameError: global name 'lastmove' is not defined

E:\py>
Comment 2 Gerrit Notification Bot 2013-12-09 16:34:04 UTC
Change 100391 had a related patch set uploaded by Xqt:
(bug 58188) global name 'lastmove' is not defined but obsolete

https://gerrit.wikimedia.org/r/100391
Comment 3 xqt 2013-12-09 16:41:57 UTC
I fixed the second failure in gerrit:100391

Indeed "../" is a relative path and not a valid page title. We may keep this bug open for further enhencements to enable relative paths.
Comment 4 Gerrit Notification Bot 2013-12-15 11:31:56 UTC
Change 100391 merged by jenkins-bot:
(bug 58188) global name 'lastmove' is not defined but obsolete

https://gerrit.wikimedia.org/r/100391
Comment 5 Amir Ladsgroup 2013-12-15 11:42:51 UTC
Can you check that again and confirm that the problem got solved?
Comment 6 xqt 2013-12-15 12:02:10 UTC
It is not solved for a relative path like "../" because it is not a valid title and pywikibot cannot solve it (yet). Maybe it's an enhancement.
Comment 7 JAn Dudík 2013-12-16 07:59:54 UTC
For the secound cause it works fine. But with crashes on [[../]] is this script still less usefull. What about hack - ignoring this titles until there is  any better patch?
Comment 8 xqt 2013-12-16 14:00:39 UTC
Just ignoring pages with bad titles instead of raising the exception would be possible.
Comment 9 Gerrit Notification Bot 2013-12-16 17:51:47 UTC
Change 101899 had a related patch set uploaded by Xqt:
(bug 58188) Ignore BadTitle Error

https://gerrit.wikimedia.org/r/101899
Comment 10 xqt 2013-12-16 17:55:10 UTC
JAn, could you try my last patch in Gerrit change #101899?
Comment 11 JAn Dudík 2013-12-16 19:43:43 UTC
It took me several minutes to find right link to diff (damned git, why is diff hidden under small (gitblit) link and not under big M fixing_redirects.py		+1, -1	*Side-by-Side* ?) and few seconds to modify my local file.

It seems good, bot skips ../ and no more crashes.
Comment 12 Gerrit Notification Bot 2013-12-18 13:11:37 UTC
Change 101899 merged by jenkins-bot:
(bug 58188) Ignore BadTitle Error

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

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links