Bugs item #2020492, was opened at 2008-07-17 12:49
Message generated for change (Comment added) made by nicdumz
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2020492&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: None
Group: None
Status: Open
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: DarkoNeko (darkoneko)
Assigned to: Nobody/Anonymous (nobody)
Summary: wikipedia.py make interwiki.py crash.
Initial Comment:
Command used :
python interwiki.py -continue -restore
autonomous -lang:ja -nlog
Version used :
5722 (latest)
Error trace :
======Post-processing [[ja:NASPAkosumosugahden]]======
Updating links on page [[ja:NASPAkosumosugahden]].
Dump ja (wikipedia) saved
Traceback (most recent call last):
File "interwiki.py", line 1723, in <module>
bot.run()
File "interwiki.py", line 1474, in run
self.queryStep()
File "interwiki.py", line 1453, in queryStep
subj.finish(self)
File "interwiki.py", line 1041, in finish
if self.replaceLinks(page, new, bot):
File "interwiki.py", line 1085, in replaceLinks
ignorepage = wikipedia.Page(page.site(), iw.groups()[0])
File "C:\Program Files\TortoiseSVN\pywikipedia\wikipedia.py", line 341, in __i
nit__
raise InvalidTitle(u'Bad page title : %s' % t)
wikipedia.InvalidTitle
----------------------------------------------------------------------
>Comment By: NicDumZ — Nicolas Dumazet (nicdumz)
Date: 2008-07-17 14:03
Message:
Logged In: YES
user_id=1963242
Originator: NO
this should be fixed by r5724, we should have been catching those,
actually.
Thanks for the report :)
----------------------------------------------------------------------
Comment By: DarkoNeko (darkoneko)
Date: 2008-07-17 12:54
Message:
Logged In: YES
user_id=1809111
Originator: YES
précisely, the article causing the crash is
http://ja.wikipedia.org/wiki/NASPA%E3%82%B3%E3%82%B9%E3%83%A2%E3%82%B9%E3%8…
It doesn't seems to have suffered vandalism, nor has it any interwiki
link, actually.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2020492&group_…
Revision: 5723
Author: nicdumz
Date: 2008-07-17 12:00:29 +0000 (Thu, 17 Jul 2008)
Log Message:
-----------
Take care of reference groups
Modified Paths:
--------------
trunk/pywikipedia/reflinks.py
Modified: trunk/pywikipedia/reflinks.py
===================================================================
--- trunk/pywikipedia/reflinks.py 2008-07-15 05:05:08 UTC (rev 5722)
+++ trunk/pywikipedia/reflinks.py 2008-07-17 12:00:29 UTC (rev 5723)
@@ -230,19 +230,27 @@
def __init__(self):
# Match references
self.REFS = re.compile(u'(?i)<ref(?P<name>[^>]*)>(?P<content>.*?)</ref>')
- self.NAMES = re.compile(u'(?i)\s*name\s*=\s*(?P<quote>"?)\s*(?P<name>.*?)\s*(?P=quote)\s*')
+ self.NAMES = re.compile(u'(?i).*name\s*=\s*(?P<quote>"?)\s*(?P<name>.*?)\s*(?P=quote).*')
+ self.GROUPS = re.compile(u'(?i).*group\s*=\s*(?P<quote>"?)\s*(?P<group>.*?)\s*(?P=quote).*')
def process(self, text):
- # key are ref contents
- # values are [name, [list of full ref matches]]
+ # keys are ref groups
+ # values are a dict where :
+ # keys are ref content
+ # values are [name, [list of full ref matches]]
foundRefs = {}
foundRefNames = []
for match in self.REFS.finditer(text):
content = match.group('content')
name = match.group('name')
- if foundRefs.has_key(content):
- v = foundRefs[content]
+ group = self.GROUPS.match(name)
+ if not foundRefs.has_key(group):
+ foundRefs[group] = {}
+
+ groupdict = foundRefs[group]
+ if groupdict.has_key(content):
+ v = groupdict[content]
v[1].append(match.group())
else:
v = [None, [match.group()]]
@@ -252,31 +260,37 @@
n = n.group('name')
v[0] = n
foundRefNames.append(n)
- foundRefs[content] = v
+ groupdict[content] = v
id = 1
while 'autogenerated%s' % id in foundRefNames:
id += 1
- for (k, v) in foundRefs.iteritems():
- if len(v[1]) == 1:
- continue
- name = v[0]
- if not name:
- name = 'autogenerated%s' % id
- id += 1
- named = u'<ref name="%s">%s</ref>' % (name, k)
- text = text.replace(v[1][0], named, 1)
+ for (g, d) in foundRefs.iteritems():
+ if g:
+ group = "group=\"%s\" " % group
+ else:
+ group = ""
- # make sure that the first (named ref) is not
- # removed later :
- pos = text.index(named) + len(named)
- header = text[:pos]
- end = text[pos:]
-
- unnamed = u'<ref name="%s" />' % name
- for ref in v[1][1:]:
- end = end.replace(ref, unnamed)
- text = header + end
+ for (k, v) in d.iteritems():
+ if len(v[1]) == 1:
+ continue
+ name = v[0]
+ if not name:
+ name = 'autogenerated%s' % id
+ id += 1
+ named = u'<ref %sname="%s">%s</ref>' % (group, name, k)
+ text = text.replace(v[1][0], named, 1)
+
+ # make sure that the first (named ref) is not
+ # removed later :
+ pos = text.index(named) + len(named)
+ header = text[:pos]
+ end = text[pos:]
+
+ unnamed = u'<ref %sname="%s" />' % (group, name)
+ for ref in v[1][1:]:
+ end = end.replace(ref, unnamed)
+ text = header + end
return text
class ReferencesRobot:
Bugs item #2020492, was opened at 2008-07-17 12:49
Message generated for change (Comment added) made by darkoneko
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2020492&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: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: DarkoNeko (darkoneko)
Assigned to: Nobody/Anonymous (nobody)
Summary: wikipedia.py make interwiki.py crash.
Initial Comment:
Command used :
python interwiki.py -continue -restore
autonomous -lang:ja -nlog
Version used :
5722 (latest)
Error trace :
======Post-processing [[ja:NASPAkosumosugahden]]======
Updating links on page [[ja:NASPAkosumosugahden]].
Dump ja (wikipedia) saved
Traceback (most recent call last):
File "interwiki.py", line 1723, in <module>
bot.run()
File "interwiki.py", line 1474, in run
self.queryStep()
File "interwiki.py", line 1453, in queryStep
subj.finish(self)
File "interwiki.py", line 1041, in finish
if self.replaceLinks(page, new, bot):
File "interwiki.py", line 1085, in replaceLinks
ignorepage = wikipedia.Page(page.site(), iw.groups()[0])
File "C:\Program Files\TortoiseSVN\pywikipedia\wikipedia.py", line 341, in __i
nit__
raise InvalidTitle(u'Bad page title : %s' % t)
wikipedia.InvalidTitle
----------------------------------------------------------------------
>Comment By: DarkoNeko (darkoneko)
Date: 2008-07-17 12:54
Message:
Logged In: YES
user_id=1809111
Originator: YES
précisely, the article causing the crash is
http://ja.wikipedia.org/wiki/NASPA%E3%82%B3%E3%82%B9%E3%83%A2%E3%82%B9%E3%8…
It doesn't seems to have suffered vandalism, nor has it any interwiki
link, actually.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2020492&group_…
Bugs item #2020492, was opened at 2008-07-17 12:49
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=2020492&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: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: DarkoNeko (darkoneko)
Assigned to: Nobody/Anonymous (nobody)
Summary: wikipedia.py make interwiki.py crash.
Initial Comment:
Command used :
python interwiki.py -continue -restore
autonomous -lang:ja -nlog
Version used :
5722 (latest)
Error trace :
======Post-processing [[ja:NASPAkosumosugahden]]======
Updating links on page [[ja:NASPAkosumosugahden]].
Dump ja (wikipedia) saved
Traceback (most recent call last):
File "interwiki.py", line 1723, in <module>
bot.run()
File "interwiki.py", line 1474, in run
self.queryStep()
File "interwiki.py", line 1453, in queryStep
subj.finish(self)
File "interwiki.py", line 1041, in finish
if self.replaceLinks(page, new, bot):
File "interwiki.py", line 1085, in replaceLinks
ignorepage = wikipedia.Page(page.site(), iw.groups()[0])
File "C:\Program Files\TortoiseSVN\pywikipedia\wikipedia.py", line 341, in __i
nit__
raise InvalidTitle(u'Bad page title : %s' % t)
wikipedia.InvalidTitle
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2020492&group_…
I'm trying to work out my bot problems (why it doesn't save), and it seems
to be something to do with the api.
Mediawiki is installed in our root directory (i.e.
www.appropedia.org/Article_name - I know this is frowned on by some, but
it's probably not practical to change this now) and it seems that it is
trying to resolve api.php as an article name - i.e.
http://www.appropedia.org/Api.php (capital A).
I asked our MediaWiki administrator, and he has questions* - any help in
answering them would be greatly appreciated:
...it seems that we need to allow the api in the localsettings and take care
of the rewrite rules... can you do a little research into the downsides of
that? Do you know if a) accessing the api is necessary? b) if there are any
problems associated with opening the api for mediawiki?
* He would normally do more research himself, but is currently working in a
remote location with little internet access... and I don't have the
technical understanding to research it properly - thanks for your patience!
--
Chris Watkins (a.k.a. Chriswaterguy)
Appropedia.org - Sharing knowledge to build rich, sustainable lives.
Blog: chriswaterguy.livejournal.com/
Buying at Amazon, eBay etc? Start at http://appropedia.maatiam.com and a
percentage of your purchase supports Appropedia - at no extra cost.
Where men are the most sure and arrogant, they are commonly the most
mistaken, and have there given reins to passion, without that proper
deliberation and suspense, which can alone secure them from the grossest
absurdities. -- David Hume
Bugs item #2018606, was opened at 2008-07-15 14:16
Message generated for change (Comment added) made by nicdumz
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2018606&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: BartekChom (bartekchom)
Assigned to: Nobody/Anonymous (nobody)
Summary: sorting order on Polish Wikipedia
Initial Comment:
Interwiki sorting order on Polish Wikipedia is now on
http://pl.wikipedia.org/wiki/Pomoc:Interwiki#Tablica_dla_skrypt.C3.B3w
----------------------------------------------------------------------
>Comment By: NicDumZ Nicolas Dumazet (nicdumz)
Date: 2008-07-16 16:29
Message:
Logged In: YES
user_id=1963242
Originator: NO
okay... Well... what is this, for those that don't read polish ? It looks
close from the alphabetic order, but some things have changed... why ?
Please update first http://meta.wikimedia.org/wiki/Interwiki_sorting_order
before asking for this change, or there'll be havoc on pl.wp if pywikipedia
uses a certain order while other tools use another :)
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2018606&group_…
Bugs item #1985308, was opened at 2008-06-05 12:39
Message generated for change (Comment added) made by melancholie
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1985308&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: 6
Private: No
Submitted By: Melancholie (melancholie)
Assigned to: Nobody/Anonymous (nobody)
Summary: Bot does not properly stay logged in (cookies)
Initial Comment:
My bot (r5514) does not stay properly logged in!
My first thought was this is because of the API_login, but it happens also for the normal login method. Is this maybe caused by SUL?
Or maybe by the following change?
http://svn.wikimedia.org/viewvc/pywikipedia?view=rev&revision=5514
See fa.wikipedia.org/wiki/_:MelancholieBot#IP_contribution
----------------------------------------------------------------------
>Comment By: Melancholie (melancholie)
Date: 2008-07-16 02:24
Message:
Logged In: YES
user_id=2089773
Originator: YES
The easiest and best workaround is to use a password file!
Add the line
password_file = "yourFileName"
to your user-config.py
Provide yourFileName with the following line(s):
("yourBot", "yourPassword")
Login and re-login is done automatically then.
----------------------------------------------------------------------
Comment By: Nobody/Anonymous (nobody)
Date: 2008-07-15 22:21
Message:
Logged In: NO
the bot asks for a password every time it tries to save a page.
"centralauth_Token" and "centralauth_Session" values in xxx-login.data
files change every time, and the bot doesn't stay logged in. any
workaround?
----------------------------------------------------------------------
Comment By: Carsrac (carsrac)
Date: 2008-06-06 10:38
Message:
Logged In: YES
user_id=2066902
Originator: NO
I have also problems. I need constantly enter in my password for several
wiki's and if I do it the bot makes tha edit under my ip adres instead of
username of the bot. The wiki that are effected are fr, ro, be, nds-nl, af,
hif, sah, srn. My ip adress is 213.132.164.186 and my bot user name is
CarsracBot. As you all know may IW bots do not any edits under its ip
adress. So I think this bug will effect very likely a lot of bots running
with pywikipedia script.
----------------------------------------------------------------------
Comment By: Szymon wierkosz (sswierkosz)
Date: 2008-06-05 13:25
Message:
Logged In: YES
user_id=2022153
Originator: NO
I don't know if this is correct behavior, but it is certainly annoying.
----------------------------------------------------------------------
Comment By: Melancholie (melancholie)
Date: 2008-06-05 13:20
Message:
Logged In: YES
user_id=2089773
Originator: YES
@sswierkosz: Yes, maybe that could be the reason. MediaWiki bug?
----------------------------------------------------------------------
Comment By: Szymon wierkosz (sswierkosz)
Date: 2008-06-05 13:07
Message:
Logged In: YES
user_id=2022153
Originator: NO
I noticed that if you log out all sessions are destroyed, not only
current. Maybe you logged in and then logged out using your bot account, so
its cookies are not valid anymore.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1985308&group_…
Bugs item #1985308, was opened at 2008-06-05 10:39
Message generated for change (Comment added) made by nobody
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1985308&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: 6
Private: No
Submitted By: Melancholie (melancholie)
Assigned to: Nobody/Anonymous (nobody)
Summary: Bot does not properly stay logged in (cookies)
Initial Comment:
My bot (r5514) does not stay properly logged in!
My first thought was this is because of the API_login, but it happens also for the normal login method. Is this maybe caused by SUL?
Or maybe by the following change?
http://svn.wikimedia.org/viewvc/pywikipedia?view=rev&revision=5514
See fa.wikipedia.org/wiki/بحث_کاربر:MelancholieBot#IP_contribution
----------------------------------------------------------------------
Comment By: Nobody/Anonymous (nobody)
Date: 2008-07-15 20:21
Message:
Logged In: NO
the bot asks for a password every time it tries to save a page.
"centralauth_Token" and "centralauth_Session" values in xxx-login.data
files change every time, and the bot doesn't stay logged in. any
workaround?
----------------------------------------------------------------------
Comment By: Carsrac (carsrac)
Date: 2008-06-06 08:38
Message:
Logged In: YES
user_id=2066902
Originator: NO
I have also problems. I need constantly enter in my password for several
wiki's and if I do it the bot makes tha edit under my ip adres instead of
username of the bot. The wiki that are effected are fr, ro, be, nds-nl, af,
hif, sah, srn. My ip adress is 213.132.164.186 and my bot user name is
CarsracBot. As you all know may IW bots do not any edits under its ip
adress. So I think this bug will effect very likely a lot of bots running
with pywikipedia script.
----------------------------------------------------------------------
Comment By: Szymon Świerkosz (sswierkosz)
Date: 2008-06-05 11:25
Message:
Logged In: YES
user_id=2022153
Originator: NO
I don't know if this is correct behavior, but it is certainly annoying.
----------------------------------------------------------------------
Comment By: Melancholie (melancholie)
Date: 2008-06-05 11:20
Message:
Logged In: YES
user_id=2089773
Originator: YES
@sswierkosz: Yes, maybe that could be the reason. MediaWiki bug?
----------------------------------------------------------------------
Comment By: Szymon Świerkosz (sswierkosz)
Date: 2008-06-05 11:07
Message:
Logged In: YES
user_id=2022153
Originator: NO
I noticed that if you log out all sessions are destroyed, not only
current. Maybe you logged in and then logged out using your bot account, so
its cookies are not valid anymore.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1985308&group_…
Bugs item #2018606, was opened at 2008-07-15 14:16
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=2018606&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: BartekChom (bartekchom)
Assigned to: Nobody/Anonymous (nobody)
Summary: sorting order on Polish Wikipedia
Initial Comment:
Interwiki sorting order on Polish Wikipedia is now on
http://pl.wikipedia.org/wiki/Pomoc:Interwiki#Tablica_dla_skrypt.C3.B3w
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2018606&group_…