Hello,
The XML parsing methd with regexps used as fallback when cElementTree
isn't present is broken. Looks like it haven't been updated for a
while. Maybe it should be removed?
Regards,
--
Santiago M. Mola
Jabber ID: cooldwind(a)gmail.com
Good evening or something,
In fixes.py I would like to change something this way: repeat the first
group with a trailing 0 (zero) character.
Something like
(ur'(x|y|z)', ur'\10')
This results in "the tenth group", and execution stops with "no such group"
message. How can I explain to the bot that I want to copy \1 and a zero
character immediately after it?
Thank you,
--
Bináris
Agree, and sorry I didn't think about it.
I'll fix it later. (I'm using school computer now)
※ 引述《"Nicolas Dumazet" <nicdumz(a)gmail.com>》之郵件內容:
>
>Agreed.
>
>But we might just need to add a simple comment explaining *why* we
>keep translations with "None" values. It might not be obvious to
>newcomers.
>
>--
>Nicolas Dumazet — NicDumZ
2009/10/23 Siebrand Mazeland <s.mazeland(a)xs4all.nl>:
> Not sure if it is a good idea to remove the 'same as default' values after
> adding it.
>
> The "None" choices were made intentionally, and with those values no longer
> being there, it will be possible to add a translation again. So even though
> the default may be a good idea, intentionally setting a language value as
> being equal to the default value should be allowed and preserved in case it
> makes sense, IMO.
>
> Any other opinions?
>
> Siebrand
Agreed.
But we might just need to add a simple comment explaining *why* we
keep translations with "None" values. It might not be obvious to
newcomers.
--
Nicolas Dumazet — NicDumZ
Not sure if it is a good idea to remove the 'same as default' values after
adding it.
The "None" choices were made intentionally, and with those values no longer
being there, it will be possible to add a translation again. So even though
the default may be a good idea, intentionally setting a language value as
being equal to the default value should be allowed and preserved in case it
makes sense, IMO.
Any other opinions?
Siebrand
-----Original Message-----
From: pywikipedia-svn-bounces(a)lists.wikimedia.org
[mailto:pywikipedia-svn-bounces@lists.wikimedia.org] On Behalf Of
alexsh(a)mayflower.esams.wikimedia.org
Sent: Thursday, October 22, 2009 6:55 PM
To: pywikipedia-svn(a)lists.wikimedia.org
Subject: [Pywikipedia-svn] SVN: [7525] trunk/pywikipedia/welcome.py
Revision: 7525
Author: alexsh
Date: 2009-10-23 01:55:05 +0000 (Fri, 23 Oct 2009)
Log Message:
-----------
clear logbook parameter
Modified Paths:
--------------
trunk/pywikipedia/welcome.py
Modified: trunk/pywikipedia/welcome.py
===================================================================
--- trunk/pywikipedia/welcome.py 2009-10-21 21:10:29 UTC (rev 7524)
+++ trunk/pywikipedia/welcome.py 2009-10-23 01:55:05 UTC (rev 7525)
@@ -203,25 +203,17 @@
logbook = {
'commons': {'_default': u'Project:Welcome log', },
'wikipedia': {
+ '_default': None,
'ar': u'Project:??? ???????',
- 'da': None, # no welcome log on da.wiki
- 'de': None, # no welcome log on de.wiki
- 'en': u'Project:Welcome log',
'fa': u'Project:????? ??????',
'fr': u'Wikipedia:Prise de décision/Accueil automatique des nouveaux
par un robot/log',
'ga': u'Project:Log fáilte',
- 'he': None, # no welcome log on he.wiki
- 'id': None, # no welcome log on id.wiki
'it': u'Project:Benvenuto Bot/Log',
'ja': u'???:Alexbot/Welcomebot??',
- 'ka': None, # no welcome log on ka.wiki
'nl': u'Project:Logboek welkom',
'no': u'Project:Velkomstlogg',
- 'pt': None, # no welcome log on pt.wiki
- 'ru': None, # no welcome log on ru.wiki
'sq': u'Project:Tung log',
'sr': u'Project:????????????',
- 'vo': None, # no welcome log on vo.wiki
'zh': u'User:Welcomebot/????',
Hello, maybe somebody could help to solve a strange interwiki bot bug.
Now I often get it when bot is checking articles with some letters with
diacritics, as in example bellow it stops when it founds Spanish letter í.
It also hapens with some Hungarian, Finnish letters. The most strange thing
is that on another computer with the same OS, the same Python version and
the same pywikipedia version everything works perfectly.
C:\Python26\pywikipedia>interwiki.py Kategorija:Lietuvos archeologija
Getting 1 pages from wikipedia:lt...
[[Kategorija:Lietuvos archeologija]]: [[lt:Kategorija:Lietuvos
archeologija]] gi
ves new interwiki [[en:Category:Archaeology of Lithuania]]
Getting 1 pages from wikipedia:en...
[[Kategorija:Lietuvos archeologija]]: [[en:Category:Archaeology of
Lithuania]] g
ives new interwiki [[es:CategorDump lt (wikipedia) saved
Traceback (most recent call last):
File "C:\Python26\pywikipedia\interwiki.py", line 2186, in <module>
bot.run()
File "C:\Python26\pywikipedia\interwiki.py", line 1888, in run
self.queryStep()
File "C:\Python26\pywikipedia\interwiki.py", line 1861, in queryStep
self.oneQuery()
File "C:\Python26\pywikipedia\interwiki.py", line 1857, in oneQuery
subject.batchLoaded(self)
File "C:\Python26\pywikipedia\interwiki.py", line 1210, in batchLoaded
wikipedia.output(u"%s: %s gives new interwiki %s"%
(self.originPage.aslink()
, page.aslink(True), linkedPage.aslink(True)))
File "C:\Python26\pywikipedia\wikipedia.py", line 7421, in output
ui.output(text, toStdout = toStdout)
File "C:\Python26\pywikipedia\userinterfaces\terminal_interface.py", line
221,
in output
self.printColorized(text, targetStream)
File "C:\Python26\pywikipedia\userinterfaces\terminal_interface.py", line
174,
in printColorized
self.printColorizedInWindows(text, targetStream)
File "C:\Python26\pywikipedia\userinterfaces\terminal_interface.py", line
156,
in printColorizedInWindows
targetStream.write(text.encode(config.console_encoding, 'replace'))
IOError: [Errno 42] Illegal byte sequence
Sarunas (User:Hugo.arg)
Hi folks,
I have a batch file that is:
> replace.py -xml:e:\huwiki-latest-pages-articles.xml -summary:"x"
> -namespace:0 -fix:vegyesjav4 -regex -excepttext:"\{\{[Ss]zinnyei\}\}"
> -excepttext:"\{\{[Pp]allas\}\}" -excepttext:"V.lyi Andr.s"
> -excepttext:"F.nyes Elek"
>
Now, exceptions don't work, and I keep getting pages with the wannabe
excepted texts. What is the mistake?
V.lyi Andr.s and F.nyes Elek stand for Vályi András and Fényes Elek, because
there is a difference between DOS and Windows characters and I wantes to
avoid this problem.
replace.py id is:
__version__='$Id: replace.py 7309 2009-09-25 00:18:58Z siebrand $'
But the same error appeared earlier, too.
--
Bináris
Hi guys,
I'm playing around with the new upload api (it's enabled at
http://test.wikipedia.org/).
Now I'm wondering what the best way would be to implement it in the
rewrite branch because uploading goes down to the core.
Three ways of uploading are possible: file, url and chunks
1. File: About the same way as we do now in upload.py, but use the api.
Prepare a form as multipart data and post it.
2. Url: Nice bandwith saver. You just pass the url of the file and the
wiki will fetch it for you.
3. Chunks: Nice to get around timeout problems. The file is send in
pieces (chunks) with a stop and wait protocol.
Url shouldn't be to hard to implement because it uses a normal http
POST. File and chunks on the other hand need to be posted as
multipart/form-data.
Any suggestions for the implementation?
Maarten