Bugs item #1783491, was opened at 2007-08-28 17:46
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1783491&group_…
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: interwiki
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Multichill (multichill)
Assigned to: Nobody/Anonymous (nobody)
Summary: Interwiki sysop crash
Initial Comment:
Updating links on page [[lv:Kategorija:Krievijas ezeri]].
Changes to be made: pievieno: [[da:Kategori:Søer i Rusland]]
+ [[da:Kategori:Søer i Rusland]]
NOTE: Updating live wiki...
Dump nl (wikipedia) saved
Traceback (most recent call last):
File "interwiki.py", line 1542, in ?
bot.run()
File "interwiki.py", line 1325, in run
self.queryStep()
File "interwiki.py", line 1304, in queryStep
subj.finish(self)
File "interwiki.py", line 924, in finish
if self.replaceLinks(page, new, bot):
File "interwiki.py", line 1051, in replaceLinks
status, reason, data = page.put(newtext, comment = wikipedia.translate(page.site().lang, msg)[0] + mods)
File "/home/bot/pywikipedia/wikipedia.py", line 1050, in put
if not self.botMayEdit():
File "/home/bot/pywikipedia/wikipedia.py", line 769, in botMayEdit
self.site().forceLogin(sysop=True)
File "/home/bot/pywikipedia/wikipedia.py", line 3188, in forceLogin
if not self.loggedInAs(sysop = sysop):
File "/home/bot/pywikipedia/wikipedia.py", line 3202, in loggedInAs
self._loadCookies(sysop = sysop)
File "/home/bot/pywikipedia/wikipedia.py", line 3239, in _loadCookies
raise NoUsername('You tried to perform an action that requires admin privileges, but you haven\'t entered your sysop name in your user-config.py. Please add sysopnames[\'%s\'][\'%s\']=\'name\' to your user-config.py' % (self.family.name, self.lang))
wikipedia.NoUsername: You tried to perform an action that requires admin privileges, but you haven't entered your sysop name in your user-config.py. Please add sysopnames['wikipedia']['lv']='name' to your user-config.py
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1783491&group_…
Bugs item #1783487, was opened at 2007-08-28 17:44
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1783487&group_…
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: interwiki
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Multichill (multichill)
Assigned to: Nobody/Anonymous (nobody)
Summary: Interwiki crash on deleted page
Initial Comment:
Updating links on page [[nl:Cultuurcentrum de Kruisboog (Kazerne)]].
Dump nl (wikipedia) saved
Traceback (most recent call last):
File "interwiki.py", line 1542, in ?
bot.run()
File "interwiki.py", line 1325, in run
self.queryStep()
File "interwiki.py", line 1304, in queryStep
subj.finish(self)
File "interwiki.py", line 924, in finish
if self.replaceLinks(page, new, bot):
File "interwiki.py", line 961, in replaceLinks
for iw in re.finditer('<!-- *\[\[(.*?:.*?)\]\] *-->', page.get()):
File "/home/bot/pywikipedia/wikipedia.py", line 524, in get
raise self._getexception
wikipedia.NoPage
The page was deleted, see http://nl.wikipedia.org/w/index.php?title=Cultuurcentrum_de_Kruisboog_%28Ka…
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1783487&group_…
Bugs item #1782842, was opened at 2007-08-27 21:10
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1782842&group_…
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: General
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Francesco Cosoleto (cosoleto)
Assigned to: Nobody/Anonymous (nobody)
Summary: NoPage error in getEditPage() when page exists
Initial Comment:
In getEditPage() a NoPage error can occur when HTML page isn't 100% downloaded due to bad connection. Maybe we can replace 'RversionTab' related code with a simple "if len(text[i1:i2]) <= 1" or "if text[i1:i2] == '\n')". Good? Better idea?
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1782842&group_…
Hello,
I added some namespaces for it.wikibooks in the family file.
Here's the SVN diff:

Please include it in the repository.
Thank you.
Pietrodn
powerpdn(a)gmail.com
Revision: 4122
Author: cosoleto
Date: 2007-08-27 15:34:08 +0000 (Mon, 27 Aug 2007)
Log Message:
-----------
added namespaces 100, 101 and Italian translations (by Pietrodin)
Modified Paths:
--------------
trunk/pywikipedia/families/wikibooks_family.py
Modified: trunk/pywikipedia/families/wikibooks_family.py
===================================================================
--- trunk/pywikipedia/families/wikibooks_family.py 2007-08-27 11:58:11 UTC (rev 4121)
+++ trunk/pywikipedia/families/wikibooks_family.py 2007-08-27 15:34:08 UTC (rev 4122)
@@ -40,9 +40,20 @@
self.namespaces[5] = {
'_default': [u'Wikibooks talk', self.namespaces[5]['_default']],
'cs': u'Wikiknihy diskuse',
+ 'it': u'Discussioni Wikibooks',
'pt': u'Wikibooks Discussão',
}
+ self.namespaces[100] = {
+ '_default': u'Portal',
+ 'it': u'Portale',
+ }
+
+ self.namespaces[101] = {
+ '_default': u'Portal talk',
+ 'it': u'Discussioni portale',
+ }
+
# Which languages have a special order for putting interlanguage links,
# and what order is it? If a language is not in interwiki_putfirst,
# alphabetical order on language code is used. For languages that are in
Revision: 4121
Author: a_engels
Date: 2007-08-27 11:58:11 +0000 (Mon, 27 Aug 2007)
Log Message:
-----------
* Added option -localright which does not follow interwikis from other pages found. To be used when you have first made the local page have exactly the right interwiki.py.
* Removed the temporary additions to resolve the be/be-x-old issue
Modified Paths:
--------------
trunk/pywikipedia/interwiki.py
Modified: trunk/pywikipedia/interwiki.py
===================================================================
--- trunk/pywikipedia/interwiki.py 2007-08-27 10:08:12 UTC (rev 4120)
+++ trunk/pywikipedia/interwiki.py 2007-08-27 11:58:11 UTC (rev 4121)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Script to check language links for general pages. This works by downloading the
@@ -142,6 +142,11 @@
-ignorefile: similar to -ignore, except that the pages are taken from
the given file instead of the command line.
+ -localright: do not follow interwiki from other pages than the starting
+ page. (Warning! Should be used very sparingly, only when
+ you are sure you have first gotten the interwiki on the
+ starting page exactly right)
+
The following arguments are only important for users who have accounts for
multiple languages, and specify on which sites the bot should modify pages:
@@ -341,6 +346,7 @@
ignore = []
bracketonly = False
rememberno = False
+ followinterwiki = True
class Subject(object):
"""
@@ -680,25 +686,22 @@
if page in self.done: #XXX: Ugly bugfix - the following line has reportedly thrown "ValueError: list.remove(x): x not in list"
self.done.remove(page)
iw = ()
- # Temporary change because of be/be-x-old issue
for linkedPage in iw:
- if linkedPage.site() == wikipedia.getSite('be','wikipedia'):
- iw.append(wikipedia.Page(wikipedia.getSite('be-x-old','wikipedia'),linkedPage.title()))
- for linkedPage in iw:
if not (self.isIgnored(linkedPage) or self.namespaceMismatch(page, linkedPage) or self.wiktionaryMismatch(linkedPage)):
- if self.addIfNew(linkedPage, counter, page):
- # It is new. Also verify whether it is the second on the
- # same site
- lpsite=linkedPage.site()
- for prevPage in self.foundIn.keys():
- if prevPage != linkedPage and prevPage.site() == lpsite:
- # Still, this could be "no problem" as either may be a
- # redirect to the other. No way to find out quickly!
- wikipedia.output(u"NOTE: %s: %s gives duplicate interwiki on same site %s" % (self.originPage.aslink(), page.aslink(True), linkedPage.aslink(True)))
- break
- else:
- if config.interwiki_shownew:
- wikipedia.output(u"%s: %s gives new interwiki %s"% (self.originPage.aslink(), page.aslink(True), linkedPage.aslink(True)))
+ if globalvar.followinterwiki or page == self.originPage:
+ if self.addIfNew(linkedPage, counter, page):
+ # It is new. Also verify whether it is the second on the
+ # same site
+ lpsite=linkedPage.site()
+ for prevPage in self.foundIn.keys():
+ if prevPage != linkedPage and prevPage.site() == lpsite:
+ # Still, this could be "no problem" as either may be a
+ # redirect to the other. No way to find out quickly!
+ wikipedia.output(u"NOTE: %s: %s gives duplicate interwiki on same site %s" % (self.originPage.aslink(), page.aslink(True), linkedPage.aslink(True)))
+ break
+ else:
+ if config.interwiki_shownew:
+ wikipedia.output(u"%s: %s gives new interwiki %s"% (self.originPage.aslink(), page.aslink(True), linkedPage.aslink(True)))
# These pages are no longer 'in progress'
self.pending = []
@@ -1014,14 +1017,8 @@
# Determine whether we need permission to submit
ask = False
if removing and removing != [page]: # Allow for special case of a self-pointing interwiki link
- # Temporary because of be/be-x-old issue - removing be: is ok if there is a be-x-old: link
- if len(removing) == 1 and removing[0].site() == wikipedia.getSite('be','wikipedia') and wikipedia.getSite('be-x-old','wikipedia') in new:
- pass
- elif len(removing) == 1 and removing[0].site() == wikipedia.getSite('be-x-old','wikipedia') and wikipedia.getSite('be','wikipedia') in new:
- pass
- else:
- self.problem('Found incorrect link to %s in %s'% (",".join([x.site().lang for x in removing]), page.aslink(True)), createneed = False)
- ask = True
+ self.problem('Found incorrect link to %s in %s'% (",".join([x.site().lang for x in removing]), page.aslink(True)), createneed = False)
+ ask = True
if globalvar.force:
ask = False
if globalvar.confirm:
@@ -1490,6 +1487,8 @@
config.interwiki_graph = True
elif arg == '-bracket':
globalvar.bracketonly = True
+ elif arg == '-localright':
+ globalvar.followinterwiki = False
else:
generator = genFactory.handleArg(arg)
if generator:
Revision: 4119
Author: valhallasw
Date: 2007-08-26 21:49:19 +0000 (Sun, 26 Aug 2007)
Log Message:
-----------
Not removing link when both commented and non-commented (i.e. <!-- [[nl:blaat]] --> [[nl:blaat]]); now using .aslink() instead of str()
Modified Paths:
--------------
trunk/pywikipedia/interwiki.py
Modified: trunk/pywikipedia/interwiki.py
===================================================================
--- trunk/pywikipedia/interwiki.py 2007-08-26 21:36:18 UTC (rev 4118)
+++ trunk/pywikipedia/interwiki.py 2007-08-26 21:49:19 UTC (rev 4119)
@@ -960,8 +960,11 @@
try:
if (new[ignorepage.site()] == ignorepage) and (ignorepage.site() != page.site()):
- wikipedia.output(u"Ignoring link to %(to)s for %(from)s" % {'to': ignorepage, 'from': page})
- new.pop(ignorepage.site())
+ if (ignorepage not in page.interwiki()):
+ wikipedia.output(u"Ignoring link to %(to)s for %(from)s" % {'to': ignorepage.aslink(), 'from': page.aslink()})
+ new.pop(ignorepage.site())
+ else:
+ wikipedia.output(u"NOTE: Not removing interwiki from %(from)s to %(to)s (exists both commented and non-commented)" % {'to': ignorepage.aslink(), 'from': page.aslink()})
except KeyError:
pass