Feature Requests item #3400899, was opened at 2011-08-30 21:29
Message generated for change (Tracker Item Submitted) made by rubin16
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603141&aid=3400899&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: rewrite
Group: None
Status: Open
Priority: 5
Private: No
Submitted By: rubin16 (rubin16)
Assigned to: Nobody/Anonymous (nobody)
Summary: imagecopy.py
Initial Comment:
CommonsHelper (http://tools.wikimedia.de/~magnus/commonshelper.php) has some troubles with parsing images from cyrillic-based wikis (see https://jira.toolserver.org/browse/MAGNUS-218). As Magnus said, it's not possible to correct this bug in commonshelper I, but now it is fixed in CommonsHelper II (http://toolserver.org/~commonshelper2/index.php).
Is it possible to switch imagecopy.py to CommonsHelperII? This would be useful not only for cyrillic wikis, but also for all other chapters, because Magnus said that it would be better to switch to CH II (http://lists.wikimedia.org/pipermail/commons-l/2011-April/005940.html) as not all serious problems can be fixed in first version and some other bugs can appear in the future.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603141&aid=3400899&group_…
Bugs item #3400045, was opened at 2011-08-29 07:36
Message generated for change (Comment added) made by xqt
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3400045&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: 7
Private: No
Submitted By: xqt (xqt)
Assigned to: Nobody/Anonymous (nobody)
Summary: generate_family_file brocken with mw 1.17
Initial Comment:
generate_family_file is brocken with mediawiki 1.17:
C:\pywikibot\PWB>generate_family_file.py
Usage: %s <url> <short name>
Example: %s http://www.mywiki.bogus/wiki/Main_Page mywiki
This will create the file families/mywiki_family.py
Please insert URL to wiki: http://techessentials.org/wiki/Main_Page
Please insert a short name (eg: freeciv): myWiki
Generating family file from http://techessentials.org/wiki/Main_Page
*** WARNING: Api does not seem to be enabled on http://techessentials.org/wiki/Main_Page
Traceback (most recent call last):
File "C:\pywikibot\PWB\generate_family_file.py", line 261, in <module>
FamilyFileGenerator(*sys.argv[1:]).run()
File "C:\pywikibot\PWB\generate_family_file.py", line 60, in run
w = Wiki(self.base_url)
File "C:\pywikibot\PWB\generate_family_file.py", line 235, in __init__
self.server = self.REwgServer.search(data).groups()[0]
AttributeError: 'NoneType' object has no attribute 'groups'
The requested wg-strings are missed on the given main page main page (http://techessentials.org/wiki/Main_Page)
See also here: http://pastebin.com/ZJiX1hGA for an other site
----------------------------------------------------------------------
>Comment By: xqt (xqt)
Date: 2011-08-30 07:32
Message:
It also does not work with mw 1.11 and 1.16.2
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3400045&group_…
Bugs item #3199823, was opened at 2011-03-04 19:00
Message generated for change (Settings changed) made by xqt
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3199823&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: Daniel Barrett (djbarrett)
Assigned to: xqt (xqt)
Summary: redirect.py crash: TypeError: __import__() takes no...
Initial Comment:
redirect.py immediately crashes with:
$ sudo python redirect.py broken
Traceback (most recent call last):
File "redirect.py", line 799, in ?
main()
File "redirect.py", line 795, in main
bot.run()
File "redirect.py", line 713, in run
self.delete_broken_redirects()
File "redirect.py", line 484, in delete_broken_redirects
reason = i18n.twtranslate(self.site, reason_broken)
File "/usr/local/pywikipedia/pywikibot/i18n.py", line 220, in twtranslate
transdict = getattr(__import__("i18n", fromlist=[package]), package).msg
TypeError: __import__() takes no keyword arguments
$ python version.py
Pywikipedia [http] trunk/pywikipedia (r9018, 2011/03/02, 06:46:39)
Python 2.4.3 (#1, Sep 3 2009, 15:37:37)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-46)]
config-settings:
use_api = True
use_api_login = True
unicode test: ok
----------------------------------------------------------------------
Comment By: Daniel Barrett (djbarrett)
Date: 2011-05-09 21:50
Message:
The previous comment was from me, the logger of the bug.
----------------------------------------------------------------------
Comment By: Nobody/Anonymous (nobody)
Date: 2011-05-09 21:49
Message:
Confirmed that the crash is gone in Python 2.4.3. Thank you!
The logging bug pointed out by valhallasw is still present, but that
should probably be a different ticket.
----------------------------------------------------------------------
Comment By: xqt (xqt)
Date: 2011-05-09 21:16
Message:
Bug raised on trunk version not at rewrite. I fixed it there with r9227 for
2.4 compatibility and tested it with py 2.7.1. Please give me any response
whether it works.
----------------------------------------------------------------------
Comment By: Merlijn S. van Deen (valhallasw)
Date: 2011-03-05 17:04
Message:
Ah, that is annoying indeed. The logging issue is a bug though, I think -
there should be a config option to set the path to store the logs.
By the way - were you using the rewrite on python 2.4 before? If it worked
before, this might be a reason to write a compatibility layer or something
like that.
----------------------------------------------------------------------
Comment By: Daniel Barrett (djbarrett)
Date: 2011-03-04 20:38
Message:
Thanks for your note. Python 2.4 is the standard issue on CentOS 5 Linux,
so it may be a while before we can upgrade our machines.
As for "sudo", thanks for your comment & concern. The sudo is necessary
because Pywikipedia is installed in /usr/local/pywikipedia and it writes
its logs to /usr/local/pywkipedia/logs, which is protected.
----------------------------------------------------------------------
Comment By: Merlijn S. van Deen (valhallasw)
Date: 2011-03-04 20:26
Message:
Hi Daniel,
This parameter was added in python 2.5. As far as I know, no steps have
been taken in the rewrite to ensure python <= 2.4 compatibility -- you will
probably run into more problems, even if this specific issue is fixed. I
would strongly suggest upgrading to 2.5.
As a secondary note - why are you using 'sudo python'? Pywikipediabot has
not been written to be 'safe to use as root' - there might be bugs that
will allow an attacker to take over your computer if you run it as root.
Best regards,
----------------------------------------------------------------------
Comment By: Daniel Barrett (djbarrett)
Date: 2011-03-04 19:02
Message:
"python redirect.py double" also crashes:
$ sudo python redirect.py double
Retrieving special page...
Retrieved 107 redirects from special page.
>>> ASP.Net precompile <<<
Links to: [[ASP.Net precompiler]].
Links to: [[ASP.Net precompilation]].
Traceback (most recent call last):
File "redirect.py", line 799, in ?
main()
File "redirect.py", line 795, in main
bot.run()
File "redirect.py", line 711, in run
self.fix_double_redirects()
File "redirect.py", line 539, in fix_double_redirects
self.fix_1_double_redirect(redir_name)
File "redirect.py", line 664, in fix_1_double_redirect
summary = i18n.twtranslate(self.site, msg_double) \
File "/usr/local/pywikipedia/pywikibot/i18n.py", line 220, in
twtranslate
transdict = getattr(__import__("i18n", fromlist=[package]),
package).msg
TypeError: __import__() takes no keyword arguments
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3199823&group_…
Bugs item #3199823, was opened at 2011-03-04 19:00
Message generated for change (Settings changed) made by xqt
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3199823&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: 5
Private: No
Submitted By: Daniel Barrett (djbarrett)
Assigned to: xqt (xqt)
Summary: redirect.py crash: TypeError: __import__() takes no...
Initial Comment:
redirect.py immediately crashes with:
$ sudo python redirect.py broken
Traceback (most recent call last):
File "redirect.py", line 799, in ?
main()
File "redirect.py", line 795, in main
bot.run()
File "redirect.py", line 713, in run
self.delete_broken_redirects()
File "redirect.py", line 484, in delete_broken_redirects
reason = i18n.twtranslate(self.site, reason_broken)
File "/usr/local/pywikipedia/pywikibot/i18n.py", line 220, in twtranslate
transdict = getattr(__import__("i18n", fromlist=[package]), package).msg
TypeError: __import__() takes no keyword arguments
$ python version.py
Pywikipedia [http] trunk/pywikipedia (r9018, 2011/03/02, 06:46:39)
Python 2.4.3 (#1, Sep 3 2009, 15:37:37)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-46)]
config-settings:
use_api = True
use_api_login = True
unicode test: ok
----------------------------------------------------------------------
Comment By: Daniel Barrett (djbarrett)
Date: 2011-05-09 21:50
Message:
The previous comment was from me, the logger of the bug.
----------------------------------------------------------------------
Comment By: Nobody/Anonymous (nobody)
Date: 2011-05-09 21:49
Message:
Confirmed that the crash is gone in Python 2.4.3. Thank you!
The logging bug pointed out by valhallasw is still present, but that
should probably be a different ticket.
----------------------------------------------------------------------
Comment By: xqt (xqt)
Date: 2011-05-09 21:16
Message:
Bug raised on trunk version not at rewrite. I fixed it there with r9227 for
2.4 compatibility and tested it with py 2.7.1. Please give me any response
whether it works.
----------------------------------------------------------------------
Comment By: Merlijn S. van Deen (valhallasw)
Date: 2011-03-05 17:04
Message:
Ah, that is annoying indeed. The logging issue is a bug though, I think -
there should be a config option to set the path to store the logs.
By the way - were you using the rewrite on python 2.4 before? If it worked
before, this might be a reason to write a compatibility layer or something
like that.
----------------------------------------------------------------------
Comment By: Daniel Barrett (djbarrett)
Date: 2011-03-04 20:38
Message:
Thanks for your note. Python 2.4 is the standard issue on CentOS 5 Linux,
so it may be a while before we can upgrade our machines.
As for "sudo", thanks for your comment & concern. The sudo is necessary
because Pywikipedia is installed in /usr/local/pywikipedia and it writes
its logs to /usr/local/pywkipedia/logs, which is protected.
----------------------------------------------------------------------
Comment By: Merlijn S. van Deen (valhallasw)
Date: 2011-03-04 20:26
Message:
Hi Daniel,
This parameter was added in python 2.5. As far as I know, no steps have
been taken in the rewrite to ensure python <= 2.4 compatibility -- you will
probably run into more problems, even if this specific issue is fixed. I
would strongly suggest upgrading to 2.5.
As a secondary note - why are you using 'sudo python'? Pywikipediabot has
not been written to be 'safe to use as root' - there might be bugs that
will allow an attacker to take over your computer if you run it as root.
Best regards,
----------------------------------------------------------------------
Comment By: Daniel Barrett (djbarrett)
Date: 2011-03-04 19:02
Message:
"python redirect.py double" also crashes:
$ sudo python redirect.py double
Retrieving special page...
Retrieved 107 redirects from special page.
>>> ASP.Net precompile <<<
Links to: [[ASP.Net precompiler]].
Links to: [[ASP.Net precompilation]].
Traceback (most recent call last):
File "redirect.py", line 799, in ?
main()
File "redirect.py", line 795, in main
bot.run()
File "redirect.py", line 711, in run
self.fix_double_redirects()
File "redirect.py", line 539, in fix_double_redirects
self.fix_1_double_redirect(redir_name)
File "redirect.py", line 664, in fix_1_double_redirect
summary = i18n.twtranslate(self.site, msg_double) \
File "/usr/local/pywikipedia/pywikibot/i18n.py", line 220, in
twtranslate
transdict = getattr(__import__("i18n", fromlist=[package]),
package).msg
TypeError: __import__() takes no keyword arguments
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3199823&group_…
Bugs item #3400045, was opened at 2011-08-29 07:36
Message generated for change (Tracker Item Submitted) made by xqt
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3400045&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: 7
Private: No
Submitted By: xqt (xqt)
Assigned to: Nobody/Anonymous (nobody)
Summary: generate_family_file brocken with mw 1.17
Initial Comment:
generate_family_file is brocken with mediawiki 1.17:
C:\pywikibot\PWB>generate_family_file.py
Usage: %s <url> <short name>
Example: %s http://www.mywiki.bogus/wiki/Main_Page mywiki
This will create the file families/mywiki_family.py
Please insert URL to wiki: http://techessentials.org/wiki/Main_Page
Please insert a short name (eg: freeciv): myWiki
Generating family file from http://techessentials.org/wiki/Main_Page
*** WARNING: Api does not seem to be enabled on http://techessentials.org/wiki/Main_Page
Traceback (most recent call last):
File "C:\pywikibot\PWB\generate_family_file.py", line 261, in <module>
FamilyFileGenerator(*sys.argv[1:]).run()
File "C:\pywikibot\PWB\generate_family_file.py", line 60, in run
w = Wiki(self.base_url)
File "C:\pywikibot\PWB\generate_family_file.py", line 235, in __init__
self.server = self.REwgServer.search(data).groups()[0]
AttributeError: 'NoneType' object has no attribute 'groups'
The requested wg-strings are missed on the given main page main page (http://techessentials.org/wiki/Main_Page)
See also here: http://pastebin.com/ZJiX1hGA for an other site
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3400045&group_…
Bugs item #3400040, was opened at 2011-08-29 06:44
Message generated for change (Comment added) made by xqt
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3400040&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: Mikko Silvonen (silvonen)
>Assigned to: xqt (xqt)
Summary: interwiki.py crashes with UnboundLocalError in i18n.py
Initial Comment:
> interwiki.py -autonomous -lang:fi -namespace:0 -start:"Vuori"
...
No changes needed on page [[it:Montagna]]
No changes needed on page [[am:???]]
Dump fi (wikipedia) appended.
Traceback (most recent call last):
File "interwiki.py", line 2542, in <module>
main()
File "interwiki.py", line 2516, in main
bot.run()
File "interwiki.py", line 2256, in run
self.queryStep()
File "interwiki.py", line 2234, in queryStep
subj.finish(self)
File "interwiki.py", line 1657, in finish
= compareLanguages(old, new, insite=site)
File "interwiki.py", line 2301, in compareLanguages
mcomment += i18n.twtranslate(insite.lang, commentname) % changes
File "c:\svn\pywikipedia\pywikibot\i18n.py", line 258, in twtranslate
trans = transdict[lang][twtitle]
UnboundLocalError: local variable 'lang' referenced before assignment
> python version.py
Pywikipedia [http] trunk/pywikipedia (r9468, 2011/08/28, 16:41:00)
Python 2.5.4 (r254:67916, Jan 29 2009, 12:02:11) [MSC v.1310 32 bit (Intel)]
config-settings:
use_api = True
use_api_login = True
unicode test: ok
----------------------------------------------------------------------
>Comment By: xqt (xqt)
Date: 2011-08-29 07:11
Message:
fixed in r9470
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3400040&group_…
Bugs item #3400040, was opened at 2011-08-29 07:44
Message generated for change (Tracker Item Submitted) made by silvonen
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3400040&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: Mikko Silvonen (silvonen)
Assigned to: Nobody/Anonymous (nobody)
Summary: interwiki.py crashes with UnboundLocalError in i18n.py
Initial Comment:
> interwiki.py -autonomous -lang:fi -namespace:0 -start:"Vuori"
...
No changes needed on page [[it:Montagna]]
No changes needed on page [[am:???]]
Dump fi (wikipedia) appended.
Traceback (most recent call last):
File "interwiki.py", line 2542, in <module>
main()
File "interwiki.py", line 2516, in main
bot.run()
File "interwiki.py", line 2256, in run
self.queryStep()
File "interwiki.py", line 2234, in queryStep
subj.finish(self)
File "interwiki.py", line 1657, in finish
= compareLanguages(old, new, insite=site)
File "interwiki.py", line 2301, in compareLanguages
mcomment += i18n.twtranslate(insite.lang, commentname) % changes
File "c:\svn\pywikipedia\pywikibot\i18n.py", line 258, in twtranslate
trans = transdict[lang][twtitle]
UnboundLocalError: local variable 'lang' referenced before assignment
> python version.py
Pywikipedia [http] trunk/pywikipedia (r9468, 2011/08/28, 16:41:00)
Python 2.5.4 (r254:67916, Jan 29 2009, 12:02:11) [MSC v.1310 32 bit (Intel)]
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=3400040&group_…
Bugs item #3399799, was opened at 2011-08-28 10:13
Message generated for change (Comment added) made by bachinchi
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3399799&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: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: Self closing tags
Initial Comment:
Since MW 1.16 wgHtm5 and wgWellFormedXml are turned on by default. And cosmetic_changes.py still changes things like <br> to <br />, I don't see any reason for that. There are three options we have here:
* Stop making these kind of changes
* Make these changes "complete" and add some tags that are not fixed (eg. <hr> to <hr />)
* Do just the opposite, and let the MW fix the tags (eg. a<br/> to <br>, etc)
I like the third option, because it makes the code easier to read for editors.
In the attachment there's a patch to apply the third option.
python version.py:
Pywikipedia [http] trunk/pywikipedia (r9462, 2011/08/28, 11:34:03)
Python 2.7 (r27:82500, Aug 07 2010, 16:54:59) [GCC]
config-settings:
use_api = True
use_api_login = True
----------------------------------------------------------------------
Comment By: B Baron (bachinchi)
Date: 2011-08-28 10:35
Message:
Ups, didn't remember that (since I have seen plenty of hr in templates), so
you can't ignore the second line in patch.
----------------------------------------------------------------------
Comment By: xqt (xqt)
Date: 2011-08-28 10:27
Message:
<hr> will be replaced by mediawiki syntax ----
look at cosmetic_changes.fixHtml()
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3399799&group_…
Bugs item #3399799, was opened at 2011-08-28 17:13
Message generated for change (Comment added) made by xqt
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3399799&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: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: Self closing tags
Initial Comment:
Since MW 1.16 wgHtm5 and wgWellFormedXml are turned on by default. And cosmetic_changes.py still changes things like <br> to <br />, I don't see any reason for that. There are three options we have here:
* Stop making these kind of changes
* Make these changes "complete" and add some tags that are not fixed (eg. <hr> to <hr />)
* Do just the opposite, and let the MW fix the tags (eg. a<br/> to <br>, etc)
I like the third option, because it makes the code easier to read for editors.
In the attachment there's a patch to apply the third option.
python version.py:
Pywikipedia [http] trunk/pywikipedia (r9462, 2011/08/28, 11:34:03)
Python 2.7 (r27:82500, Aug 07 2010, 16:54:59) [GCC]
config-settings:
use_api = True
use_api_login = True
----------------------------------------------------------------------
>Comment By: xqt (xqt)
Date: 2011-08-28 17:27
Message:
<hr> will be replaced by mediawiki syntax ----
look at cosmetic_changes.fixHtml()
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3399799&group_…
Bugs item #3399799, was opened at 2011-08-28 15:13
Message generated for change (Tracker Item Submitted) made by nobody
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3399799&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: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: Self closing tags
Initial Comment:
Since MW 1.16 wgHtm5 and wgWellFormedXml are turned on by default. And cosmetic_changes.py still changes things like <br> to <br />, I don't see any reason for that. There are three options we have here:
* Stop making these kind of changes
* Make these changes "complete" and add some tags that are not fixed (eg. <hr> to <hr />)
* Do just the opposite, and let the MW fix the tags (eg. a<br/> to <br>, etc)
I like the third option, because it makes the code easier to read for editors.
In the attachment there's a patch to apply the third option.
python version.py:
Pywikipedia [http] trunk/pywikipedia (r9462, 2011/08/28, 11:34:03)
Python 2.7 (r27:82500, Aug 07 2010, 16:54:59) [GCC]
config-settings:
use_api = True
use_api_login = True
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3399799&group_…