Bugs item #3346901, was opened at 2011-06-30 11:48
Message generated for change (Tracker Item Submitted) made by heldergeovane
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3346901&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: H2G (heldergeovane)
Assigned to: Nobody/Anonymous (nobody)
Summary: Fix translateAndCapitalizeNamespaces for Portuguese
Initial Comment:
Per discussion on
https://secure.wikimedia.org/wikipedia/pt/wiki/Wikipédia:Esplanada/proposta…"Imagem"_em_vez_de_"Arquivo"_ou_"Ficheiro"_(12mar2011)?uselang=en
please, change the function translateAndCapitalizeNamespaces (from cosmetic_changes.py) so that the bots stop doing the following chnges:
* Image --> Ficheiro
* File --> Ficheiro
* Arquivo --> Ficheiro
* Imagem --> Ficheiro
This is necessary in order to avoid linguistic problems, considering that "Arquivo" is the preferred word on Brazil but "Ficheiro" is preferred on Portugal.
For **image** files, the word "Imagem" is common to both Portuguese variants, and as such it is preferred, so this should be the name used when changing the namespace name of images. The use of "Ficheiro" and "Arquivo" is preferred only for **other kinds of files** (such as PDF or OGG), which are not images.
So, in short, the bots should do the following changes:
* For images (i.e. files with one of the following extensions: png, gif, jpg, jpeg, svg, tiff, tif), change:
** Image --> Imagem
** File --> Imagem
** Ficheiro --> Imagem
** Arquivo --> Imagem
*For other files (i.e. files with one of the following extensions: xcf, pdf, mid, ogg, ogv, djvu, oga):
** Arquivo --> Do not change (we should respect the variant used by the editors)
** Ficheiro --> Do not change (we should respect the variant used by the editors)
** File --> Do not change (or change randomly to "Ficheiro" or "Arquivo", since it is indeed a "file" and both pt and pt-BR are acceptable)
** Image --> Do not change (or change randomly to "Ficheiro" or "Arquivo", since it is indeed a "file" and both pt and pt-BR are acceptable)
** Imagem --> Do not change (or change randomly to "Ficheiro" or "Arquivo", since it is indeed a "file" and both pt and pt-BR are acceptable)
PS: the output of "python version.py" is the foolowing, although this bug report applies to all versions:
----
Pywikipedia [http] trunk/pywikipedia (r9323, 2011/06/30, 12:40:56)
Python 2.7.1+ (r271:86832, Apr 11 2011, 18:13:53)
[GCC 4.5.2]
config-settings:
use_api = True
use_api_login = True
unicode test: ok
----
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3346901&group_…
Bugs item #3346599, was opened at 2011-06-30 14:19
Message generated for change (Comment added) made by xqt
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3346599&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: Closed
>Resolution: Fixed
Priority: 1
Private: No
Submitted By: Bináris (binbot)
>Assigned to: xqt (xqt)
Summary: Textlib.py documentation
Initial Comment:
In textlib.py, line 45
old - a compiled regular expression
should rather be
old - a compiled or uncompiled regular expression
See also from line 98 up (it will be compiled if its type is str or unicode).
----------------------------------------------------------------------
>Comment By: xqt (xqt)
Date: 2011-06-30 14:51
Message:
fixed in r9323. Thanks.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3346599&group_…
Bugs item #3346599, was opened at 2011-06-30 14:19
Message generated for change (Settings changed) made by binbot
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3346599&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: 1
Private: No
Submitted By: Bináris (binbot)
Assigned to: Nobody/Anonymous (nobody)
Summary: Textlib.py documentation
Initial Comment:
In textlib.py, line 45
old - a compiled regular expression
should rather be
old - a compiled or uncompiled regular expression
See also from line 98 up (it will be compiled if its type is str or unicode).
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3346599&group_…
Bugs item #3346599, was opened at 2011-06-30 14:19
Message generated for change (Tracker Item Submitted) made by binbot
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3346599&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: Bináris (binbot)
Assigned to: Nobody/Anonymous (nobody)
Summary: Textlib.py documentation
Initial Comment:
In textlib.py, line 45
old - a compiled regular expression
should rather be
old - a compiled or uncompiled regular expression
See also from line 98 up (it will be compiled if its type is str or unicode).
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3346599&group_…
Bugs item #2995454, was opened at 2010-05-02 13:43
Message generated for change (Settings changed) made by xqt
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2995454&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: category
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: Mercy (wikimercy)
>Assigned to: xqt (xqt)
Summary: Double redirects on Commons
Initial Comment:
The bot fixes a double redirect, however, it does not take account for the fact that Files and Categories need a colon before the namespace name on Commons.
See an example here: http://commons.wikimedia.org/w/index.php?title=Lee_Ang&diff=prev&oldid=3395… and in the following revision.
--------------
Pywikipedia rev. 8140
Python 2.6.4 (r264:75706, Nov 3 2009, 13:23:17) [MSC v.1500 32 bit (Intel)] on win32
use_api = True
----------------------------------------------------------------------
>Comment By: xqt (xqt)
Date: 2011-06-29 07:57
Message:
fixed in r9320
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2995454&group_…
Bugs item #3315973, was opened at 2011-06-14 01:54
Message generated for change (Settings changed) made by xqt
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3315973&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: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: Nobody/Anonymous (nobody)
>Assigned to: xqt (xqt)
Summary: redirect.py sometimes categorizes double redirects
Initial Comment:
version:
Pywikipedia (r8725 (wikipedia.py) 2010/11/15, 08:44:06)
Python 2.7.1 (r271:86832, Nov 27 2010, 18:30:46) [MSC v.1500 32 bit (Intel)]
config-settings:
use_api = True
use_api_login = True
In class RedirectRobot, for fixing Special:DoubleRedirects please include capability to detect if the final target page is in the Category namespace (ns:14) and in the case that it returns true append a colon before replacing the appropriate target to avoid categorizing the redirect itself.
E.g.:
>>> Foo <<<
Links to: [[Bar]].
Links to: [[Category:Foobar]].
- #REDIRECT [[Bar]]
+ #REDIRECT [[:Category:Foobar]]
^(and here is the extra colon)
Otherwise, [[Foo]] would be categorized in [[Category:Foobar]], which is not desirable.
----------------------------------------------------------------------
>Comment By: xqt (xqt)
Date: 2011-06-29 07:51
Message:
fixed in r9320
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3315973&group_…
Bugs item #3153555, was opened at 2011-01-09 09:33
Message generated for change (Comment added) made by nobody
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3153555&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: Tgr (tgr_)
Assigned to: Nobody/Anonymous (nobody)
Summary: Unicode error when handling non-ASCII network errors
Initial Comment:
The error handler for Site.postData in wikipedia.py line 5248 (in r8821) casts an exception to a string:
except Exception, e:
output(u'%s' %e)
This will fail with a UnicodeDecodeError if the exception message contains non-ASCII characters (which is often the case for network error messages on non-English Windows).
Pywikipedia [http] trunk/pywikipedia (r8821, 2011/01/06, 22:01:33)
Python 2.7 (r27:82525, Jul 4 2010, 09:01:59) [MSC v.1500 32 bit (Intel)]
config-settings:
use_api = True
use_api_login = True
unicode test: triggers problem #3081100
----------------------------------------------------------------------
Comment By: Nobody/Anonymous (nobody)
Date: 2011-06-22 19:51
Message:
dpdGAI <a href="http://fechymsuggnt.com/">fechymsuggnt</a>,
[url=http://kmsfjqdruizn.com/]kmsfjqdruizn[/url],
[link=http://rvfrfsruaemj.com/]rvfrfsruaemj[/link],
http://tjpffrxsfrts.com/
----------------------------------------------------------------------
Comment By: Tgr (tgr_)
Date: 2011-01-09 13:59
Message:
Hungarian Windows, codepage 852
%r gives
URLError(error(10054, 'A l\xe9tez\xf5 kapcsolatot a t\xe1voli
\xe1llom\xe1s k\xe9nyszer\xedtetten bez\xe1rta'),)
----------------------------------------------------------------------
Comment By: Merlijn S. van Deen (valhallasw)
Date: 2011-01-09 10:33
Message:
Can you reproduce the problem?
If so, please change output(u"%s" % e) to output(u"%r"% e) and add a
comment with the output you get. Additionally, please tell us what code
page you are using (run 'chcp' in a dos box) and the language of your
windows version.
Thanks.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3153555&group_…
Support Requests item #3309476, was opened at 2011-05-31 01:11
Message generated for change (Comment added) made by sf-robot
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603139&aid=3309476&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: Closed
Priority: 5
Private: No
Submitted By: Ardian Wardhana (ardwar)
Assigned to: xqt (xqt)
Summary: Bot terminates unexpectedly
Initial Comment:
Please, the checkimages.py and unusedfiles.py terminates when it try to edit a page.
========== unusedfiles.py ==========
unicode test: triggers problem #3081100
Getting 60 pages from wikipedia:id...
>>> Berkas:08AksaraRekan.JPG <<<
Berkas:08AksaraRekan.JPG
+
+ {{hapus|Berkas tidak digunakan}}
Do you want to accept these changes? ([y]es, [N]o, [a]ll) y
WARNING: Your account on wikipedia:id does not have a bot flag. Its edits will be visible in the recent changes and it may get blocked.
Updating page [[Berkas:08AksaraRekan.JPG]] via API
Traceback (most recent call last):
File "D:\Program Files\Python27\Lib\pywikipedia\unusedfiles1.py", line 122, in <module>
main()
File "D:\Program Files\Python27\Lib\pywikipedia\unusedfiles1.py", line 117, in main
msg2uploader = template_user % page.title()
TypeError: not all arguments converted during string formatting
====================
========== checkimages.py ==========
unicode test: triggers problem #3081100
Retrieving the latest 1000 files for checking...
...Loading the licenses allowed...
Loading kategori:Templat lisensi gambar...
Loading Kategori:Templat lisensi fairuse...
>> No additional settings found! <<
Tokoh T Sulung.jpg has only text and not the specific license...
Execution time: 41
Traceback (most recent call last):
File "D:\Program Files\Python27\Lib\pywikipedia\checkimages.py", line 1903, in <module>
checkbot()
File "D:\Program Files\Python27\Lib\pywikipedia\checkimages.py", line 1887, in checkbot
resultCheck = mainClass.checkStep()
File "D:\Program Files\Python27\Lib\pywikipedia\checkimages.py", line 1652, in checkStep
notification = nn % self.imageName
TypeError: not all arguments converted during string formatting
====================
----------------------------------------------------------------------
>Comment By: SourceForge Robot (sf-robot)
Date: 2011-06-14 10:20
Message:
This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by
the administrator of this Tracker).
----------------------------------------------------------------------
Comment By: xqt (xqt)
Date: 2011-05-31 10:15
Message:
It seems these files where modified. Maybe this causes that error. I've
fixed unusedfile.py which might not run properly for it-wiki.
Please check your nothing_notification dictionary in checkimages.py
whether it contains the string formatting placeholder %s
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603139&aid=3309476&group_…
Bugs item #3311663, was opened at 2011-06-04 19:20
Message generated for change (Settings changed) made by huji
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3311663&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: Closed
Resolution: Fixed
Priority: 5
Private: No
Submitted By: Huji Lee (huji)
>Assigned to: Huji Lee (huji)
Summary: Error in duplicate removal code
Initial Comment:
In revision 7461, Alex had added a line to wikipedia.py like this (currently, line 5607):
self._rights[index] = list(set(self._rights[index]))
This is trying to remove duplicates in the _rights dictionary by creating a hash and then converting it back to a list.
I have created a bot to work in TranslateWiki and I get this error when ever the bot tries to save a page on the wiki:
Traceback (most recent call last):
File "dictation.py", line 180, in <module>
main()
File "dictation.py", line 174, in main
bot.run()
File "dictation.py", line 61, in run
self.treat(page)
File "dictation.py", line 83, in treat
if not self.save(text, page, self.summary):
File "dictation.py", line 121, in save
minorEdit=minorEdit, botflag=botflag)
File "/home/hojjat/bot/wikipedia.py", line 1682, in put
sysop = self._getActionUser(action = 'edit', restriction = self.editRestriction, sysop = sysop)
File "/home/hojjat/bot/wikipedia.py", line 1555, in _getActionUser
self.site().forceLogin(sysop = sysop)
File "/home/hojjat/bot/wikipedia.py", line 4922, in forceLogin
if not self.loggedInAs(sysop = sysop):
File "/home/hojjat/bot/wikipedia.py", line 4914, in loggedInAs
self._load(sysop = sysop)
File "/home/hojjat/bot/wikipedia.py", line 5994, in _load
self._getUserData(text, sysop = sysop, force = force)
File "/home/hojjat/bot/wikipedia.py", line 5608, in _getUserData
self._rights[index] = dict.fromkeys(self._rights[index]).keys()
TypeError: unhashable type: 'dict'
The last line suggests that the duplicate removal code doesn't work with dictionaries. I tried substituting that line with this:
self._rights[index] = dict.fromkeys(self._rights[index]).keys()
But still got the same error message.
I guess this has something to do with the fact that TranslateWiki uses custom user permissions (other than MediaWiki default). I have attached the family file I created for TranslateWiki for reference.
This is my python version info:
Pywikipedia [svn+ssh] huji@trunk/pywikipedia (r9287, 2011/06/04, 10:13:18)
Python 2.7.1+ (r271:86832, Apr 11 2011, 18:05:24)
[GCC 4.5.2]
config-settings:
use_api = True
use_api_login = True
unicode test: ok
----------------------------------------------------------------------
Comment By: Huji Lee (huji)
Date: 2011-06-05 16:13
Message:
I fixed the bug in revision 9288. I don't have permissoin on this tracker,
so please close the bug accordingly.
----------------------------------------------------------------------
Comment By: Huji Lee (huji)
Date: 2011-06-05 11:17
Message:
>> Could you write in a new line 5604 "print self._rights[index]" and dump
here the result?
Surely can, and I wonder why I didn't try that myself!
[{u'*': u'*', u'implicit': u''}, {u'*': u'user', u'implicit': u''},
u'bot', u'translator', u'bot', u'autoconfirmed', u'nominornewtalk',
u'autopatrol', u'suppressredirect', u'apihighlimits', u'writeapi',
u'skipcaptcha', u'move', u'move-subpages', u'move-rootuserpages',
u'editinterface', u'translate', u'deletedhistory', u'createaccount',
u'read', u'edit', u'minoredit', u'createpage', u'createtalk', u'upload',
u'reupload', u'reupload-shared', u'purge', u'lqt-split', u'lqt-merge',
u'lqt-react', u'webchat', 'read', 'createaccount', 'edit', 'upload',
'createpage', 'createtalk', 'move', 'upload']
Seems like the first two elements of the list are dicts, which is why I
got that error message. I'm going to trace back to see where these dicts
are being added. In the meantime, do you think it would be a correct fix to
make sure each element of the dict is added as an element in the list? In
other words, if I change this:
...{u'*': u'user', u'implicit': u''}, u'bot', u'translator'...
to this:
u'*', u'user', u'implicit', u'bot', u'translator'
is that okay?
>> except TypeError:
I think duplicate removal is mandatory and except is not the best
workaround. I'm going to try to fix the bug instead.
----------------------------------------------------------------------
Comment By: Binris (binbot)
Date: 2011-06-05 01:41
Message:
I can' t imagine how all the "appends" and "extends" work in the previous
lines if it is a dict rather than a list.
Could you write in a new line 5604 "print self._rights[index]" and dump
here the result? The attached family file has nothing to say about rights.
----------------------------------------------------------------------
Comment By: Binris (binbot)
Date: 2011-06-05 01:05
Message:
Well, I thought nbsb was working here, so indent them naturally.
----------------------------------------------------------------------
Comment By: Binris (binbot)
Date: 2011-06-05 01:04
Message:
Once a type is unhashable, it can't be applied as a dict key either, so the
second try had to fail.
If removing doubles is not vital here, you may use this instead as a
workaround:
try:
self._rights[index] = list(set(self._rights[index]))
except TypeError:
pass
This will prevent the bot of stopping, but leaves duplicates.
----------------------------------------------------------------------
Comment By: Huji Lee (huji)
Date: 2011-06-04 19:23
Message:
Please disregard the first few words about who added that line. I relied on
VIewVC's annotate function, but that lines isn't coming from revision 7461,
apparently.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3311663&group_…
Bugs item #3315973, was opened at 2011-06-13 23:54
Message generated for change (Tracker Item Submitted) made by nobody
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3315973&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: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: redirect.py sometimes categorizes double redirects
Initial Comment:
version:
Pywikipedia (r8725 (wikipedia.py) 2010/11/15, 08:44:06)
Python 2.7.1 (r271:86832, Nov 27 2010, 18:30:46) [MSC v.1500 32 bit (Intel)]
config-settings:
use_api = True
use_api_login = True
In class RedirectRobot, for fixing Special:DoubleRedirects please include capability to detect if the final target page is in the Category namespace (ns:14) and in the case that it returns true append a colon before replacing the appropriate target to avoid categorizing the redirect itself.
E.g.:
>>> Foo <<<
Links to: [[Bar]].
Links to: [[Category:Foobar]].
- #REDIRECT [[Bar]]
+ #REDIRECT [[:Category:Foobar]]
^(and here is the extra colon)
Otherwise, [[Foo]] would be categorized in [[Category:Foobar]], which is not desirable.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3315973&group_…