Support Requests item #3065711, was opened at 2010-09-14 04:14
Message generated for change (Comment added) made by sf-robot
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603139&aid=3065711&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: Install Problem
Group: None
>Status: Closed
Priority: 5
Private: No
Submitted By: https://www.google.com/accounts ()
Assigned to: xqt (xqt)
Summary: replace.py appears to be broken with MW 1.15.5 on Ubuntu
Initial Comment:
On Ubuntu 10.04 and 8.04, when I try to run replace.py from the 2010-09-13 version in SVN:
Traceback (most recent call last):
File "/path/to/pywikipedia/pagegenerators.py", line 1225, in __iter__
for page in self.wrapped_gen:
File "/path/to/pywikipedia/pagegenerators.py", line 1157, in DuplicateFilterPageGenerator
for page in generator:
File "path/to/pywikipedia/pagegenerators.py", line 617, in AllpagesPageGenerator
includeredirects=includeredirects):
File "/path/to/pywikipedia/wikipedia.py", line 6431, in allpages
for p in data['query']['allpages']:
KeyError: 'query'
'query'
Replace.py works on an identical installation on a Mac using the same versions of Apache, PHP, and MySQL. This problem showed up when I upgraded to MW 1.15.5 from 1.15.4 on Ubuntu - no problems whatsoever on the Mac after the upgrade.
I would prefer to go to 1.16, but I am using an extension (SMWHalo) that does not yet work with that version.
Any ideas? The problem arises no matter what I put in the command line, but works just fine on the Mac. I can edit locally and upload to the Ubuntu installations, but this is not a viable long-term solution.
Unfortunately, I don't have the time to learn Python to try to identify the error - but I do know that it pywikipediabot shouldn't completely break every time there is a minor upgrade to MediaWiki. It's great when it works, but when it doesn't, I find myself wishing for less fragile solution.
----------------------------------------------------------------------
>Comment By: SourceForge Robot (sf-robot)
Date: 2010-09-29 19:34
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: 2010-09-15 10:16
Message:
btw. allpages() hasn't changed since r8350
http://svn.wikimedia.org/viewvc/pywikipedia/trunk/pywikipedia/wikipedia.py?…
----------------------------------------------------------------------
Comment By: xqt (xqt)
Date: 2010-09-15 10:14
Message:
Try r8560 and check it with -verbose. It looks like an API error since
'query' is not in data object.
Maybe there is something wrong with json module? You have different Python
versions.
----------------------------------------------------------------------
Comment By: https://www.google.com/accounts ()
Date: 2010-09-14 04:31
Message:
Update: On further investigation, it looks like there was some sort of
change introduced in pywikipediabot, NOT mediawiki.
Version string on the Mac:
Pywikipedia nightly:pywikipedia (r8350, 2010/07/09, 08:02:52)
Python 2.6.1 (r261:67515, Feb 11 2010, 00:51:29)
[GCC 4.2.1 (Apple Inc. build 5646)]
config-settings:
use_api = True
use_api_login = True
On one of the Ubuntu boxes:
Pywikipedia [http] trunk/pywikipedia (r8551, 2010/09/13, 15:49:35)
Python 2.5.2 (r252:60911, Jan 20 2010, 21:48:48)
[GCC 4.2.4 (Ubuntu 4.2.4-1ubuntu3)]
config-settings:
use_api = True
use_api_login = True
Any ideas?
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603139&aid=3065711&group_…
Bugs item #3077408, was opened at 2010-09-28 13:04
Message generated for change (Comment added) made by djbarrett
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3077408&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: login
Group: None
>Status: Closed
>Resolution: Wont Fix
Priority: 5
Private: No
Submitted By: Daniel Barrett (djbarrett)
Assigned to: Nobody/Anonymous (nobody)
Summary: redirect.py claims I'm not a sysop
Initial Comment:
Recently, redirect.py is refusing to delete articles, claiming "No sysop in user-config.py, put page to speedy deletion." However, the user in user-config.py is indeed a "bot" and a "sysop" on our wiki. This behavior began recently.
$ python redirect.py broken -pt:1
Retrieving special page...
Retrieved 55 redirects from special page.
>>> My article title <<<
Redirect target [[My missing article]] does not exist. Do you want to delete [[My article title]]? ([y]es, [N]o, [a]ll, [q]uit) y
No sysop in user-config.py, put page to speedy deletion.
Updating page [[Country based pricing plan]] via API
user-config.py contains:
mylang='en'
family='mywiki'
usernames['vistawiki']['en'] = u'Wikisysop2'
I already tried clearing out the login-data subdirectory and running login.py again (successfully). However, the sysop problem remains. Any ideas?
$ python version.py
Pywikipedia [http] trunk/pywikipedia (r8598, 2010/09/27, 09:35:21)
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
----------------------------------------------------------------------
>Comment By: Daniel Barrett (djbarrett)
Date: 2010-09-28 14:46
Message:
That worked. I assume this is a new configuration variable that wasn't
required previously.
----------------------------------------------------------------------
Comment By: Multichill (multichill)
Date: 2010-09-28 13:58
Message:
Please add
sysopnames['vistawiki']['en'] = u'Wikisysop2'
to your user-config.py and try again.
----------------------------------------------------------------------
Comment By: Daniel Barrett (djbarrett)
Date: 2010-09-28 13:05
Message:
Typo in my example: "Country based pricing plan" should read "My article
title".
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3077408&group_…
Bugs item #3077408, was opened at 2010-09-28 19:04
Message generated for change (Comment added) made by multichill
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3077408&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: login
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Daniel Barrett (djbarrett)
Assigned to: Nobody/Anonymous (nobody)
Summary: redirect.py claims I'm not a sysop
Initial Comment:
Recently, redirect.py is refusing to delete articles, claiming "No sysop in user-config.py, put page to speedy deletion." However, the user in user-config.py is indeed a "bot" and a "sysop" on our wiki. This behavior began recently.
$ python redirect.py broken -pt:1
Retrieving special page...
Retrieved 55 redirects from special page.
>>> My article title <<<
Redirect target [[My missing article]] does not exist. Do you want to delete [[My article title]]? ([y]es, [N]o, [a]ll, [q]uit) y
No sysop in user-config.py, put page to speedy deletion.
Updating page [[Country based pricing plan]] via API
user-config.py contains:
mylang='en'
family='mywiki'
usernames['vistawiki']['en'] = u'Wikisysop2'
I already tried clearing out the login-data subdirectory and running login.py again (successfully). However, the sysop problem remains. Any ideas?
$ python version.py
Pywikipedia [http] trunk/pywikipedia (r8598, 2010/09/27, 09:35:21)
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
----------------------------------------------------------------------
>Comment By: Multichill (multichill)
Date: 2010-09-28 19:58
Message:
Please add
sysopnames['vistawiki']['en'] = u'Wikisysop2'
to your user-config.py and try again.
----------------------------------------------------------------------
Comment By: Daniel Barrett (djbarrett)
Date: 2010-09-28 19:05
Message:
Typo in my example: "Country based pricing plan" should read "My article
title".
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3077408&group_…
Bugs item #3077408, was opened at 2010-09-28 13:04
Message generated for change (Comment added) made by djbarrett
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3077408&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: login
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Daniel Barrett (djbarrett)
Assigned to: Nobody/Anonymous (nobody)
Summary: redirect.py claims I'm not a sysop
Initial Comment:
Recently, redirect.py is refusing to delete articles, claiming "No sysop in user-config.py, put page to speedy deletion." However, the user in user-config.py is indeed a "bot" and a "sysop" on our wiki. This behavior began recently.
$ python redirect.py broken -pt:1
Retrieving special page...
Retrieved 55 redirects from special page.
>>> My article title <<<
Redirect target [[My missing article]] does not exist. Do you want to delete [[My article title]]? ([y]es, [N]o, [a]ll, [q]uit) y
No sysop in user-config.py, put page to speedy deletion.
Updating page [[Country based pricing plan]] via API
user-config.py contains:
mylang='en'
family='mywiki'
usernames['vistawiki']['en'] = u'Wikisysop2'
I already tried clearing out the login-data subdirectory and running login.py again (successfully). However, the sysop problem remains. Any ideas?
$ python version.py
Pywikipedia [http] trunk/pywikipedia (r8598, 2010/09/27, 09:35:21)
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
----------------------------------------------------------------------
>Comment By: Daniel Barrett (djbarrett)
Date: 2010-09-28 13:05
Message:
Typo in my example: "Country based pricing plan" should read "My article
title".
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3077408&group_…
Bugs item #3077408, was opened at 2010-09-28 13:04
Message generated for change (Tracker Item Submitted) made by djbarrett
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3077408&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: login
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Daniel Barrett (djbarrett)
Assigned to: Nobody/Anonymous (nobody)
Summary: redirect.py claims I'm not a sysop
Initial Comment:
Recently, redirect.py is refusing to delete articles, claiming "No sysop in user-config.py, put page to speedy deletion." However, the user in user-config.py is indeed a "bot" and a "sysop" on our wiki. This behavior began recently.
$ python redirect.py broken -pt:1
Retrieving special page...
Retrieved 55 redirects from special page.
>>> My article title <<<
Redirect target [[My missing article]] does not exist. Do you want to delete [[My article title]]? ([y]es, [N]o, [a]ll, [q]uit) y
No sysop in user-config.py, put page to speedy deletion.
Updating page [[Country based pricing plan]] via API
user-config.py contains:
mylang='en'
family='mywiki'
usernames['vistawiki']['en'] = u'Wikisysop2'
I already tried clearing out the login-data subdirectory and running login.py again (successfully). However, the sysop problem remains. Any ideas?
$ python version.py
Pywikipedia [http] trunk/pywikipedia (r8598, 2010/09/27, 09:35:21)
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
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3077408&group_…
Bugs item #3077071, was opened at 2010-09-28 08:42
Message generated for change (Tracker Item Submitted) made by nobody
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3077071&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: reflinks.py error
Initial Comment:
reflinks.py
http://ru.wikipedia.org/w/index.php?curid=313972&diff=28059315&oldid=279855…http://ru.wikipedia.org/w/index.php?diff=prev&oldid=28060080
Script uncorrectly works with some ref-tags.
----------
# python version.py
Pywikipedia [http] trunk/pywikipedia (r8598, 2010/09/27, 09:35:21)
Python 2.6.6 (r266:84292, Sep 15 2010, 17:31:39)
[GCC 4.2.1 20070719 [FreeBSD]]
config-settings:
use_api = True
use_api_login = True
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3077071&group_…
Bugs item #3033739, was opened at 2010-07-23 21:52
Message generated for change (Comment added) made by xqt
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3033739&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: Pending
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: MF-Warburg (mfwarburg)
>Assigned to: xqt (xqt)
Summary: Namespace alias on Incubator
Initial Comment:
On Wikimedia Incubator (http://incubator.wikimedia.org), there is a namespace alias I: redirecting to the project namespace Incubator: - similar to WP: on English Wikipedia as an alias for Wikipedia:.
fixing_redirects.py always stops working when finding a link to an I: page, so could this alias please be added to the family file (incubator_family.py)?
python version.py output:
Pywikipedia [http] trunk/pywikipedia (r8361, 2010/07/20, 06:17:53)
Python 2.5.2 (r252:60911, Jan 24 2010, 17:44:40)
[GCC 4.3.2]
config-settings:
use_api = True
use_api_login = True
----------------------------------------------------------------------
>Comment By: xqt (xqt)
Date: 2010-09-22 17:17
Message:
fixed in r8591. Patch wasn't valid. Please check it now.
----------------------------------------------------------------------
Comment By: Ian Foote (quintic)
Date: 2010-09-21 21:39
Message:
Untested patch at
https://sourceforge.net/tracker/?func=detail&aid=3072894&group_id=93107&ati….
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3033739&group_…
Patches item #3072894, was opened at 2010-09-21 21:38
Message generated for change (Comment added) made by xqt
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603140&aid=3072894&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: Rejected
Priority: 5
Private: No
Submitted By: Ian Foote (quintic)
>Assigned to: xqt (xqt)
Summary: Namespace alias on Incubator
Initial Comment:
Untested patch for https://sourceforge.net/tracker/?func=detail&aid=3033739&group_id=93107&ati….
----------------------------------------------------------------------
>Comment By: xqt (xqt)
Date: 2010-09-22 16:46
Message:
incubator has no language 'en'
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603140&aid=3072894&group_…
Bugs item #3033739, was opened at 2010-07-23 20:52
Message generated for change (Comment added) made by quintic
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3033739&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: MF-Warburg (mfwarburg)
Assigned to: Nobody/Anonymous (nobody)
Summary: Namespace alias on Incubator
Initial Comment:
On Wikimedia Incubator (http://incubator.wikimedia.org), there is a namespace alias I: redirecting to the project namespace Incubator: - similar to WP: on English Wikipedia as an alias for Wikipedia:.
fixing_redirects.py always stops working when finding a link to an I: page, so could this alias please be added to the family file (incubator_family.py)?
python version.py output:
Pywikipedia [http] trunk/pywikipedia (r8361, 2010/07/20, 06:17:53)
Python 2.5.2 (r252:60911, Jan 24 2010, 17:44:40)
[GCC 4.3.2]
config-settings:
use_api = True
use_api_login = True
----------------------------------------------------------------------
Comment By: Ian Foote (quintic)
Date: 2010-09-21 20:39
Message:
Untested patch at
https://sourceforge.net/tracker/?func=detail&aid=3072894&group_id=93107&ati….
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3033739&group_…
Feature Requests item #3072733, was opened at 2010-09-21 17:25
Message generated for change (Settings changed) made by xqt
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603141&aid=3072733&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: Nobody/Anonymous (nobody)
>Assigned to: xqt (xqt)
Summary: redirect.py: Remove ja message and sd-template for broken.
Initial Comment:
redirect.py
Please remove ja message and sd-template for broken.
Because, broken redirect is not included ''Deletion policy'' and/or ''Criteria for speedy deletion'' in Japanese Wikipedia.
----------------------------------------------------------------------
>Comment By: xqt (xqt)
Date: 2010-09-21 18:48
Message:
done in r8587
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603141&aid=3072733&group_…
Feature Requests item #1993062, was opened at 2008-06-13 16:47
Message generated for change (Comment added) made by xqt
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603141&aid=1993062&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
>Priority: 1
Private: No
Submitted By: Melancholie (melancholie)
Assigned to: Nobody/Anonymous (nobody)
Summary: Use API module 'parse' for retrieving interwiki links
Initial Comment:
Currently pages are retrieved in a batch by using Special:Export.
Although being fast (as only one request is done), there is a huge data overhead with this method!
Why not use the API with its 'parse' module? Only interwiki links can be fetched with that, reducing traffic (overhead) a lot!
See:
http://de.wikipedia.org/w/api.php?action=parse&format=xml&page=Test&prop=la…
Outputs could be downloaded in parallel to virtualize a batch (faster).
----
At least make this method optional (config.py) for being able of reducing data traffic, if wanted. API is just more efficient.
----------------------------------------------------------------------
>Comment By: xqt (xqt)
Date: 2010-09-21 18:35
Message:
parse mode is deactivated due to overloading the squids. Nothing to do now.
----------------------------------------------------------------------
Comment By: Multichill (multichill)
Date: 2008-11-13 12:46
Message:
We are working on a rewrite. The rewrite uses the api as much as possible.
----------------------------------------------------------------------
Comment By: Melancholie (melancholie)
Date: 2008-06-15 01:27
Message:
Logged In: YES
user_id=2089773
Originator: YES
See http://meta.wikimedia.org/wiki/Interwiki_bot_access_protocol
concerning disambiguations and redirects:
http://de.wikipedia.org/w/api.php?action=parse&format=xml&text={{:Main_Page…
----------------------------------------------------------------------
Comment By: Melancholie (melancholie)
Date: 2008-06-14 16:38
Message:
Logged In: YES
user_id=2089773
Originator: YES
Backwards compatibility?
That's no reason for not making software more efficient, where possible
;-)
That's also why I wrote something about "optional", too.
Because for current MediaWiki wikis there is a much more efficient way of
retrieving (only) certain contents (langlinks, categories), there should be
a method of using that advantage! Will reduce load (bot owner's and
server's)...
----------------------------------------------------------------------
Comment By: Bryan (btongminh)
Date: 2008-06-13 20:44
Message:
Logged In: YES
user_id=1806226
Originator: NO
Backwards compatibility with non Wikimedia wikis?
----------------------------------------------------------------------
Comment By: Melancholie (melancholie)
Date: 2008-06-13 17:20
Message:
Logged In: YES
user_id=2089773
Originator: YES
For not being misusable of confusing bots, the yet to be set up MediaWiki
message could contain [[foreigncode:{{CURRENTTIMESTAMP}}]] (cache issue?)
(sorry for spamming with this request ;-)
----------------------------------------------------------------------
Comment By: Melancholie (melancholie)
Date: 2008-06-13 17:08
Message:
Logged In: YES
user_id=2089773
Originator: YES
Important note for getting pages' interwikis in a batch:
http://de.wikipedia.org/w/api.php?action=parse&text={{:Test}}{{:Bot}}{{:Hau…
Either the bot could figure out what interwikis belong together then, or
maybe a marker could placed in between:
http://de.wikipedia.org/w/api.php?action=parse&text={{:Test}}{{MediaWiki:Iw…
[[MediaWiki:Iwmarker]] (or 'Llmarker'?) would have to be set up by the
MediaWiki developers with [[en:/de:Abuse-save-mark]] as content (but this
is potentially misusable).
----------------------------------------------------------------------
Comment By: Melancholie (melancholie)
Date: 2008-06-13 16:51
Message:
Logged In: YES
user_id=2089773
Originator: YES
Note: Maybe combine it with 'generator'.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603141&aid=1993062&group_…
Feature Requests item #3072733, was opened at 2010-09-21 15:25
Message generated for change (Tracker Item Submitted) made by nobody
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603141&aid=3072733&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
Priority: 5
Private: No
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: redirect.py: Remove ja message and sd-template for broken.
Initial Comment:
redirect.py
Please remove ja message and sd-template for broken.
Because, broken redirect is not included ''Deletion policy'' and/or ''Criteria for speedy deletion'' in Japanese Wikipedia.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603141&aid=3072733&group_…
Bugs item #3053539, was opened at 2010-08-26 14:05
Message generated for change (Comment added) made by nobody
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3053539&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: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Daniel Barrett (djbarrett)
Assigned to: Nobody/Anonymous (nobody)
Summary: category.py move ignores noinclude, includeonly
Initial Comment:
When running "python category.py move", if the old category is enclosed in <noinclude> or <includeonly> tags, the new, replaced category is not, which is a problem. For example, this construction:
<includeonly>[[Category:Foo]]</includeonly>
when operated on by:
python category.py move -from:"Foo" -to:"Bar"
produces:
<includeonly></includeonly>
[[Category:Bar]]
which is wrong.
This bug has existed for a long time, at least a few years.
$ python version.py
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
$ svn info
Revision: 8319
----------------------------------------------------------------------
Comment By: Nobody/Anonymous (nobody)
Date: 2010-09-20 17:47
Message:
Bug 3066934 is no longer blocking this bug from being fixed.
----------------------------------------------------------------------
Comment By: Daniel Barrett (djbarrett)
Date: 2010-09-15 15:33
Message:
Note: bug 3066934 may block you from testing this. r8562 introduced a
fatal bug in category.py.
----------------------------------------------------------------------
Comment By: Daniel Barrett (djbarrett)
Date: 2010-09-15 15:32
Message:
Here is an even worse example. Just like in the previous example, create
"Template:Pywikipedia test", but this time, make its contents:
Hello.<noinclude>[[Category:AABBCC]]</noinclude><includeonly>[[Category:EE]]</includeonly>
Again, make the article "Test" contain:
{{pywikipedia test}}
Now run:
$ python category.py move -from:"AABBCC" -to:"DD"
In this case, "Template:Pywikipedia test" gets modified completely wrong
to become:
Hello.<noinclude></noinclude><includeonly>
</includeonly>
[[Category:DD]]
So the category tag for "EE" vanishes completely, and "DD" gets moved
outside of the "noinclude" tags.
Piwikipedia's output for this command was:
$ python category.py move -from:"AABBCC" -to:"DD"
Target page Category:DD already exists!
Getting [[Category:AABBCC]]...
Getting 1 pages from vistawiki:en...
Sleeping for 5.8 seconds, 2010-09-15 11:28:53
Updating page [[Template:Pywikipedia test]] via API
Getting [[Category:AABBCC]]...
----------------------------------------------------------------------
Comment By: Daniel Barrett (djbarrett)
Date: 2010-09-15 15:29
Message:
Yes, it's related to templates. Here is a test case.
1. Create "Template:Pywikipedia test" containing:
Hello.<includeonly>[[Category:AABBCC]]</includeonly>
2. Create an article "test" containing:
{{pywikipedia test}}
3. Run:
$ python category.py move -from:"AABBCC" -to:"DD"
The output shows that Pywikipedia gets confused and can't modify the
category tag inside the template:
Target page Category:DD already exists!
Getting [[Category:AABBCC]]...
Getting 1 pages from vistawiki:en...
ERROR: [[Test]] is not in category Category:AABBCC!
Getting [[Category:AABBCC]]...
----------------------------------------------------------------------
Comment By: xqt (xqt)
Date: 2010-09-15 10:19
Message:
Is this related to templates? Could you give me a sample.
----------------------------------------------------------------------
Comment By: Daniel Barrett (djbarrett)
Date: 2010-09-13 19:58
Message:
This bug is destructive to wiki articles. Any chance it will be addressed
soon? Thanks.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3053539&group_…
Bugs item #2555767, was opened at 2009-02-01 17:25
Message generated for change (Comment added) made by xqt
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2555767&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: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: interwiki.py removes redirects
Initial Comment:
interwiki.py vers. 6312
My interwiki-options are -autonomous -force -noredirect .
As I found at this link e.g. [http://it.wikipedia.org/w/index.php?title=Assiomi_di_Huzita-Hatori&diff=217…] interwiki.py removes redirected interwiki links instead of fixing it during -noredirect option. I supposed that -noredirect ignores links coming from the redirected page and keep or fix the redirect link but not deleting it. In this given case, the english page has been moved before the bot does its work. Here are some statements from the logfile depending on this matter:
[[折り紙公ç†]]: [[ja:折り紙公ç†]] gives new interwiki [[it:Assiomi di Huzita-Hatori]]
[[折り紙公ç†]]: [[ja:折り紙公ç†]] gives new interwiki [[en:Huzita-Hatori axioms]]
[[折り紙公ç†]]: [[ja:折り紙公ç†]] gives new interwiki [[ru:Правила Худзита]]
[[折り紙公ç†]]: [[ja:折り紙公ç†]] gives new interwiki [[fa:اصل هوزیتا-هاتوری]]
Getting 60 pages from wikipedia:en...
NOTE: [[en:Huzita-Hatori axioms]] is redirect to [[en:Huzita–Hatori axioms]]
NOTE: not following redirects.
======Post-processing [[ja:折り紙公ç†]]======
Updating links on page [[it:Assiomi di Huzita-Hatori]].
Changes to be made: Aggiungo: [[ja:折り紙公ç†]] Tolgo: [[en:Huzita-Hatori axioms]]
- [[en:Huzita-Hatori axioms]]
+ [[ja:折り紙公ç†]]
ERROR: Found incorrect link to en in [[it:Assiomi di Huzita-Hatori]]
NOTE: Performing a recursive query first to save time....
NOTE: Nothing left to do 2
NOTE: Updating live wiki...
Changing page [[it:Assiomi di Huzita-Hatori]]
Updating links on page [[ja:折り紙公ç†]].
Changes to be made: 除去: [[en:Huzita-Hatori axioms]]
- [[en:Huzita-Hatori axioms]]
ERROR: Found incorrect link to en in [[ja:折り紙公ç†]]
NOTE: Performing a recursive query first to save time....
NOTE: Nothing left to do 2
NOTE: Updating live wiki...
Changing page [[折り紙公ç†]]
Updating links on page [[ru:Правила Худзита]].
Changes to be made: добавил: [[ja:折り紙公ç†]] удалил: [[en:Huzita-Hatori axioms]]
- [[en:Huzita-Hatori axioms]]
+ [[ja:折り紙公ç†]]
ERROR: Found incorrect link to en in [[ru:Правила Худзита]]
NOTE: Performing a recursive query first to save time....
NOTE: Nothing left to do 2
NOTE: Updating live wiki...
Changing page [[ru:Правила Худзита]]
Updating links on page [[fa:اصل هوزیتا-هاتوری]].
Changes to be made: Ø§ÙØ²ÙˆØ¯Ù†: [[ja:折り紙公ç†]] ØØ°Ù: [[en:Huzita-Hatori axioms]]
- [[en:Huzita-Hatori axioms]]
+ [[ja:折り紙公ç†]]
ERROR: Found incorrect link to en in [[fa:اصل هوزیتا-هاتوری]]
NOTE: Performing a recursive query first to save time....
NOTE: Nothing left to do 2
NOTE: Updating live wiki...
Changing page [[fa:اصل هوزیتا-هاتوری]]
[w:de:User:Xqt]
----------------------------------------------------------------------
>Comment By: xqt (xqt)
Date: 2010-09-20 07:23
Message:
for now use -cleanup instead of -force option
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2555767&group_…
Patches item #3070962, was opened at 2010-09-19 08:37
Message generated for change (Settings changed) made by xqt
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603140&aid=3070962&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: Dmitry Nikitin (dmitrynikitin)
>Assigned to: xqt (xqt)
Summary: "cosmetic changes" for Commons
Initial Comment:
Please add the changes from http://commons.wikimedia.org/wiki/Commons:Tools/pywiki_file_description_cle…
to cosmetic_changes.py
----------------------------------------------------------------------
>Comment By: xqt (xqt)
Date: 2010-09-19 18:51
Message:
done in r8575
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603140&aid=3070962&group_…
Support Requests item #3070233, was opened at 2010-09-18 17:37
Message generated for change (Comment added) made by multichill
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603139&aid=3070233&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: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: uploading pictures
Initial Comment:
is there a possibility to upload pictures to commons?
----------------------------------------------------------------------
>Comment By: Multichill (multichill)
Date: 2010-09-19 14:44
Message:
You can use upload.py to upload images. More information at
http://en.wikibooks.org/wiki/Pywikibot/upload.py
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603139&aid=3070233&group_…
Patches item #3070962, was opened at 2010-09-19 06:37
Message generated for change (Tracker Item Submitted) made by dmitrynikitin
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603140&aid=3070962&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: Dmitry Nikitin (dmitrynikitin)
Assigned to: Nobody/Anonymous (nobody)
Summary: "cosmetic changes" for Commons
Initial Comment:
Please add the changes from http://commons.wikimedia.org/wiki/Commons:Tools/pywiki_file_description_cle…
to cosmetic_changes.py
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603140&aid=3070962&group_…
Support Requests item #3070233, was opened at 2010-09-18 15:37
Message generated for change (Tracker Item Submitted) made by nobody
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603139&aid=3070233&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
Priority: 5
Private: No
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: uploading pictures
Initial Comment:
is there a possibility to upload pictures to commons?
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603139&aid=3070233&group_…
Bugs item #3066934, was opened at 2010-09-15 17:12
Message generated for change (Settings changed) made by xqt
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3066934&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: 7
Private: No
Submitted By: Daniel Barrett (djbarrett)
Assigned to: xqt (xqt)
Summary: AttributeError: type object 'Timestamp' has no attribute 'st
Initial Comment:
category.py is throwing the error in the Summary. MediaWiki 1.15.4,
$ sudo python category.py move -from:"AABBCC" -to:"DD"
Traceback (most recent call last):
File "/usr/local/pywikipedia/pagegenerators.py", line 1238, in __iter__
for loaded_page in self.preload(somePages):
File "/usr/local/pywikipedia/pagegenerators.py", line 1257, in preload
pywikibot.getall(site, pagesThisSite)
File "/usr/local/pywikipedia/wikipedia.py", line 4208, in getall
_GetAll(site, pages, throttle, force).run()
File "/usr/local/pywikipedia/wikipedia.py", line 3887, in run
xml.sax.parseString(data, handler)
File "/usr/lib64/python2.4/xml/sax/__init__.py", line 49, in parseString
parser.parse(inpsrc)
File "/usr/lib64/python2.4/xml/sax/expatreader.py", line 107, in parse
xmlreader.IncrementalParser.parse(self, source)
File "/usr/lib64/python2.4/xml/sax/xmlreader.py", line 123, in parse
self.feed(buffer)
File "/usr/lib64/python2.4/xml/sax/expatreader.py", line 207, in feed
self._parser.Parse(data, isFinal)
File "/usr/lib64/python2.4/xml/sax/expatreader.py", line 303, in end_element
self._cont_handler.endElement(name)
File "/usr/local/pywikipedia/xmlreader.py", line 202, in endElement
self.callback(entry)
File "/usr/local/pywikipedia/wikipedia.py", line 3923, in oneDone
page2._versionhistory = [(revisionId, str(Timestamp.fromtimestampformat(timestamp)), username, entry.comment)]
File "/usr/local/pywikipedia/pywikibot/__init__.py", line 47, in fromtimestampformat
return cls.strptime(ts, cls.mediawikiTSFormat)
AttributeError: type object 'Timestamp' has no attribute 'strptime'
type object 'Timestamp' has no attribute 'strptime'
Getting [[Category:AABBCC]]...
Getting [[Category:AABBCC]]...
Couldn't delete Category:AABBCC - not empty.
$ python version.py
Pywikipedia [http] trunk/pywikipedia (r8562, 2010/09/15, 12:54:46)
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
----------------------------------------------------------------------
Comment By: Daniel Barrett (djbarrett)
Date: 2010-09-16 17:15
Message:
Thanks, it's fixed!
----------------------------------------------------------------------
Comment By: xqt (xqt)
Date: 2010-09-16 13:21
Message:
done in r8566
I change this line with direct time class methods. It should work now.
Well I should declare py 2.4 as deprecated ;)
----------------------------------------------------------------------
Comment By: Daniel Barrett (djbarrett)
Date: 2010-09-15 21:08
Message:
I'm sorry, our systems run CentOS Linux which comes with a specific Python
version that I do not have access to change.
----------------------------------------------------------------------
Comment By: xqt (xqt)
Date: 2010-09-15 20:10
Message:
I am not shure but maybe py 2.4 isn't able to handle such class construct.
I'll revert this changes for now.
Could you try it with a newer python?
----------------------------------------------------------------------
Comment By: Daniel Barrett (djbarrett)
Date: 2010-09-15 19:46
Message:
One more:
>>> wp.Timestamp.fromtimestampformat(t)
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/local/pywikipedia/pywikibot/__init__.py", line 47, in
fromtimestampformat
return cls.strptime(ts, cls.mediawikiTSFormat)
AttributeError: type object 'Timestamp' has no attribute 'strptime'
----------------------------------------------------------------------
Comment By: Daniel Barrett (djbarrett)
Date: 2010-09-15 19:45
Message:
OK trying again:
import time
import wikipedia as wp
t = time.strftime("%Y%m%d%H%M%S",time.gmtime())
t
Produces:
'20100915174350'
Then:
wp.Timestamp
still produces:
<class 'pywikibot.Timestamp'>
----------------------------------------------------------------------
Comment By: Daniel Barrett (djbarrett)
Date: 2010-09-15 19:42
Message:
I don't know Python, so I am just repeating what you wrote. First I did:
$ python
Python 2.4.3 (#1, Sep 3 2009, 15:37:37)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-46)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
Then I did:
import wikipedia as wp
t = time.strftime("%Y%m%d%H%M%S",time.gmtime())
Produces:
Traceback (most recent call last):
File "<stdin>", line 1, in ?
NameError: name 'time' is not defined
wp.Timestamp.
Produces:
<class 'pywikibot.Timestamp'>
Then I did:
import sys
sys.path
Produces:
['', '/usr/lib64/python24.zip', '/usr/lib64/python2.4',
'/usr/lib64/python2.4/plat-linux2', '/usr/lib64/python2.4/lib-tk',
'/usr/lib64/python2.4/lib-dynload', '/usr/lib64/python2.4/site-packages',
'/usr/lib64/python2.4/site-packages/gtk-2.0',
'/usr/lib/python2.4/site-packages',
'/usr/local/pywikipedia/userinterfaces',
'/usr/local/pywikipedia/families']
----------------------------------------------------------------------
Comment By: xqt (xqt)
Date: 2010-09-15 19:34
Message:
I haven't found this error. Could you verify some things via idle:
import wikipedia as wp
t = time.strftime("%Y%m%d%H%M%S",time.gmtime())
t
this should print sth like
'20100915172517'
wp.Timestamp.
Please hold this dot and you'll see availlable methods
wp.Timestamp.fromtimestampformat(t)
produces
Timestamp(2010, 9, 15, 17, 31, 53)
str(wp.Timestamp.fromtimestampformat(t))
produces
'2010-09-15T17:31:53Z'
Please also give me your sys.path()
----------------------------------------------------------------------
Comment By: Daniel Barrett (djbarrett)
Date: 2010-09-15 17:22
Message:
The bug was introduced in revision 8562:
svn diff -c8562
Index: wikipedia.py
===================================================================
--- wikipedia.py (revision 8561)
+++ wikipedia.py (revision 8562)
@@ -2559,8 +2559,11 @@
dataQuery = self._versionhistoryearliest
else:
thisHistoryDone = True
- elif not hasattr(self, '_versionhistory') or forceReload:
+ elif not hasattr(self, '_versionhistory') or forceReload or \
+ len(self._versionhistory) < revCount:
self._versionhistory = []
+ # ?? does not load if len(self._versionhistory) > revCount
+ # shouldn't it
elif getAll and len(self._versionhistory) == revCount:
# Cause a reload, or at least make the loop run
thisHistoryDone = False
@@ -3907,7 +3910,7 @@
successful = False
for page2 in self.pages:
if page2.sectionFreeTitle() == page.sectionFreeTitle():
- if not (hasattr(page2,'_contents') or
hasattr(page2,'_getexception')) or self.force:
+ if not (hasattr(page2,'_contents') or hasattr(page2,
'_getexception')) or self.force:
page2.editRestriction = entry.editRestriction
page2.moveRestriction = entry.moveRestriction
if editRestriction == 'autoconfirmed':
@@ -3917,6 +3920,7 @@
page2._ipedit = ipedit
page2._revisionId = revisionId
page2._editTime = timestamp
+ page2._versionhistory = [(revisionId,
str(Timestamp.fromtimestampformat(timestamp)), username, entry.comment)]
section = page2.section()
# Store the content
page2._contents = text
----------------------------------------------------------------------
Comment By: Daniel Barrett (djbarrett)
Date: 2010-09-15 17:16
Message:
Note: the example did create category "DD" but did not recategorize the
page in the AABBCC category. (There is only one page in the category.)
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3066934&group_…
Bugs item #3066934, was opened at 2010-09-15 11:12
Message generated for change (Comment added) made by djbarrett
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3066934&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: 7
Private: No
Submitted By: Daniel Barrett (djbarrett)
Assigned to: xqt (xqt)
Summary: AttributeError: type object 'Timestamp' has no attribute 'st
Initial Comment:
category.py is throwing the error in the Summary. MediaWiki 1.15.4,
$ sudo python category.py move -from:"AABBCC" -to:"DD"
Traceback (most recent call last):
File "/usr/local/pywikipedia/pagegenerators.py", line 1238, in __iter__
for loaded_page in self.preload(somePages):
File "/usr/local/pywikipedia/pagegenerators.py", line 1257, in preload
pywikibot.getall(site, pagesThisSite)
File "/usr/local/pywikipedia/wikipedia.py", line 4208, in getall
_GetAll(site, pages, throttle, force).run()
File "/usr/local/pywikipedia/wikipedia.py", line 3887, in run
xml.sax.parseString(data, handler)
File "/usr/lib64/python2.4/xml/sax/__init__.py", line 49, in parseString
parser.parse(inpsrc)
File "/usr/lib64/python2.4/xml/sax/expatreader.py", line 107, in parse
xmlreader.IncrementalParser.parse(self, source)
File "/usr/lib64/python2.4/xml/sax/xmlreader.py", line 123, in parse
self.feed(buffer)
File "/usr/lib64/python2.4/xml/sax/expatreader.py", line 207, in feed
self._parser.Parse(data, isFinal)
File "/usr/lib64/python2.4/xml/sax/expatreader.py", line 303, in end_element
self._cont_handler.endElement(name)
File "/usr/local/pywikipedia/xmlreader.py", line 202, in endElement
self.callback(entry)
File "/usr/local/pywikipedia/wikipedia.py", line 3923, in oneDone
page2._versionhistory = [(revisionId, str(Timestamp.fromtimestampformat(timestamp)), username, entry.comment)]
File "/usr/local/pywikipedia/pywikibot/__init__.py", line 47, in fromtimestampformat
return cls.strptime(ts, cls.mediawikiTSFormat)
AttributeError: type object 'Timestamp' has no attribute 'strptime'
type object 'Timestamp' has no attribute 'strptime'
Getting [[Category:AABBCC]]...
Getting [[Category:AABBCC]]...
Couldn't delete Category:AABBCC - not empty.
$ python version.py
Pywikipedia [http] trunk/pywikipedia (r8562, 2010/09/15, 12:54:46)
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
----------------------------------------------------------------------
>Comment By: Daniel Barrett (djbarrett)
Date: 2010-09-16 11:15
Message:
Thanks, it's fixed!
----------------------------------------------------------------------
Comment By: xqt (xqt)
Date: 2010-09-16 07:21
Message:
done in r8566
I change this line with direct time class methods. It should work now.
Well I should declare py 2.4 as deprecated ;)
----------------------------------------------------------------------
Comment By: Daniel Barrett (djbarrett)
Date: 2010-09-15 15:08
Message:
I'm sorry, our systems run CentOS Linux which comes with a specific Python
version that I do not have access to change.
----------------------------------------------------------------------
Comment By: xqt (xqt)
Date: 2010-09-15 14:10
Message:
I am not shure but maybe py 2.4 isn't able to handle such class construct.
I'll revert this changes for now.
Could you try it with a newer python?
----------------------------------------------------------------------
Comment By: Daniel Barrett (djbarrett)
Date: 2010-09-15 13:46
Message:
One more:
>>> wp.Timestamp.fromtimestampformat(t)
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/local/pywikipedia/pywikibot/__init__.py", line 47, in
fromtimestampformat
return cls.strptime(ts, cls.mediawikiTSFormat)
AttributeError: type object 'Timestamp' has no attribute 'strptime'
----------------------------------------------------------------------
Comment By: Daniel Barrett (djbarrett)
Date: 2010-09-15 13:45
Message:
OK trying again:
import time
import wikipedia as wp
t = time.strftime("%Y%m%d%H%M%S",time.gmtime())
t
Produces:
'20100915174350'
Then:
wp.Timestamp
still produces:
<class 'pywikibot.Timestamp'>
----------------------------------------------------------------------
Comment By: Daniel Barrett (djbarrett)
Date: 2010-09-15 13:42
Message:
I don't know Python, so I am just repeating what you wrote. First I did:
$ python
Python 2.4.3 (#1, Sep 3 2009, 15:37:37)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-46)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
Then I did:
import wikipedia as wp
t = time.strftime("%Y%m%d%H%M%S",time.gmtime())
Produces:
Traceback (most recent call last):
File "<stdin>", line 1, in ?
NameError: name 'time' is not defined
wp.Timestamp.
Produces:
<class 'pywikibot.Timestamp'>
Then I did:
import sys
sys.path
Produces:
['', '/usr/lib64/python24.zip', '/usr/lib64/python2.4',
'/usr/lib64/python2.4/plat-linux2', '/usr/lib64/python2.4/lib-tk',
'/usr/lib64/python2.4/lib-dynload', '/usr/lib64/python2.4/site-packages',
'/usr/lib64/python2.4/site-packages/gtk-2.0',
'/usr/lib/python2.4/site-packages',
'/usr/local/pywikipedia/userinterfaces',
'/usr/local/pywikipedia/families']
----------------------------------------------------------------------
Comment By: xqt (xqt)
Date: 2010-09-15 13:34
Message:
I haven't found this error. Could you verify some things via idle:
import wikipedia as wp
t = time.strftime("%Y%m%d%H%M%S",time.gmtime())
t
this should print sth like
'20100915172517'
wp.Timestamp.
Please hold this dot and you'll see availlable methods
wp.Timestamp.fromtimestampformat(t)
produces
Timestamp(2010, 9, 15, 17, 31, 53)
str(wp.Timestamp.fromtimestampformat(t))
produces
'2010-09-15T17:31:53Z'
Please also give me your sys.path()
----------------------------------------------------------------------
Comment By: Daniel Barrett (djbarrett)
Date: 2010-09-15 11:22
Message:
The bug was introduced in revision 8562:
svn diff -c8562
Index: wikipedia.py
===================================================================
--- wikipedia.py (revision 8561)
+++ wikipedia.py (revision 8562)
@@ -2559,8 +2559,11 @@
dataQuery = self._versionhistoryearliest
else:
thisHistoryDone = True
- elif not hasattr(self, '_versionhistory') or forceReload:
+ elif not hasattr(self, '_versionhistory') or forceReload or \
+ len(self._versionhistory) < revCount:
self._versionhistory = []
+ # ?? does not load if len(self._versionhistory) > revCount
+ # shouldn't it
elif getAll and len(self._versionhistory) == revCount:
# Cause a reload, or at least make the loop run
thisHistoryDone = False
@@ -3907,7 +3910,7 @@
successful = False
for page2 in self.pages:
if page2.sectionFreeTitle() == page.sectionFreeTitle():
- if not (hasattr(page2,'_contents') or
hasattr(page2,'_getexception')) or self.force:
+ if not (hasattr(page2,'_contents') or hasattr(page2,
'_getexception')) or self.force:
page2.editRestriction = entry.editRestriction
page2.moveRestriction = entry.moveRestriction
if editRestriction == 'autoconfirmed':
@@ -3917,6 +3920,7 @@
page2._ipedit = ipedit
page2._revisionId = revisionId
page2._editTime = timestamp
+ page2._versionhistory = [(revisionId,
str(Timestamp.fromtimestampformat(timestamp)), username, entry.comment)]
section = page2.section()
# Store the content
page2._contents = text
----------------------------------------------------------------------
Comment By: Daniel Barrett (djbarrett)
Date: 2010-09-15 11:16
Message:
Note: the example did create category "DD" but did not recategorize the
page in the AABBCC category. (There is only one page in the category.)
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3066934&group_…
Bugs item #2968140, was opened at 2010-03-10 18:48
Message generated for change (Comment added) made by xqt
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2968140&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: Accepted
Priority: 5
Private: No
Submitted By: JAn (jandudik)
Assigned to: xqt (xqt)
Summary: unrecognized dismbiguation templates
Initial Comment:
In http://en.wikipedia.org/wiki/MediaWiki:Disambiguationspage there are some templates which are not as links. bot cannot recognize it and removes links to some disambiguations with templates like {{shiplist}} or {{surname}}.
But these articles are in some languages as disambigs, in some not. Maybe do something for recognize these as semi-disambiguations?
----------------------------------------------------------------------
>Comment By: xqt (xqt)
Date: 2010-09-16 13:34
Message:
ok this seems more resticted but with new -cleanup option this doesn't
matter. Fix coming (soon)?
----------------------------------------------------------------------
Comment By: GanZ (ganz-ru)
Date: 2010-09-15 23:45
Message:
Example of incorrect work:
http://en.wikipedia.org/w/index.php?title=Gari%2C_Russia&action=historysubm…
. Page en:Gari,_Russia has {{SIA}} and it should be linked with
ru:Гари_(Россия) that is "true" disambiguation. But the bot
changed link into another, non-disambiguation page. And It wasn't in
"force" mode.
----------------------------------------------------------------------
Comment By: xqt (xqt)
Date: 2010-09-15 20:24
Message:
on other sites these pages aren't marked as disambigs and this would lead
in removing interwiki links there.
There is a ways to not remove these links: do not use -force in
-autonomous mode!
Please be free to use the new -cleanup option instead I implemented this
week (and read the mail list). This does not touch disambig mismatches.
----------------------------------------------------------------------
Comment By: GanZ (ganz-ru)
Date: 2010-09-15 18:19
Message:
I join to the request of JAn. In en.wiki there is a special type of
disambigiations - {{SIA}}. When Script work automatically it concerns pages
with {{SIA}} as non-disambig and can remove correct interwikis.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2968140&group_…
Bugs item #3066934, was opened at 2010-09-15 17:12
Message generated for change (Comment added) made by xqt
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3066934&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: Pending
Resolution: None
Priority: 7
Private: No
Submitted By: Daniel Barrett (djbarrett)
Assigned to: xqt (xqt)
Summary: AttributeError: type object 'Timestamp' has no attribute 'st
Initial Comment:
category.py is throwing the error in the Summary. MediaWiki 1.15.4,
$ sudo python category.py move -from:"AABBCC" -to:"DD"
Traceback (most recent call last):
File "/usr/local/pywikipedia/pagegenerators.py", line 1238, in __iter__
for loaded_page in self.preload(somePages):
File "/usr/local/pywikipedia/pagegenerators.py", line 1257, in preload
pywikibot.getall(site, pagesThisSite)
File "/usr/local/pywikipedia/wikipedia.py", line 4208, in getall
_GetAll(site, pages, throttle, force).run()
File "/usr/local/pywikipedia/wikipedia.py", line 3887, in run
xml.sax.parseString(data, handler)
File "/usr/lib64/python2.4/xml/sax/__init__.py", line 49, in parseString
parser.parse(inpsrc)
File "/usr/lib64/python2.4/xml/sax/expatreader.py", line 107, in parse
xmlreader.IncrementalParser.parse(self, source)
File "/usr/lib64/python2.4/xml/sax/xmlreader.py", line 123, in parse
self.feed(buffer)
File "/usr/lib64/python2.4/xml/sax/expatreader.py", line 207, in feed
self._parser.Parse(data, isFinal)
File "/usr/lib64/python2.4/xml/sax/expatreader.py", line 303, in end_element
self._cont_handler.endElement(name)
File "/usr/local/pywikipedia/xmlreader.py", line 202, in endElement
self.callback(entry)
File "/usr/local/pywikipedia/wikipedia.py", line 3923, in oneDone
page2._versionhistory = [(revisionId, str(Timestamp.fromtimestampformat(timestamp)), username, entry.comment)]
File "/usr/local/pywikipedia/pywikibot/__init__.py", line 47, in fromtimestampformat
return cls.strptime(ts, cls.mediawikiTSFormat)
AttributeError: type object 'Timestamp' has no attribute 'strptime'
type object 'Timestamp' has no attribute 'strptime'
Getting [[Category:AABBCC]]...
Getting [[Category:AABBCC]]...
Couldn't delete Category:AABBCC - not empty.
$ python version.py
Pywikipedia [http] trunk/pywikipedia (r8562, 2010/09/15, 12:54:46)
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
----------------------------------------------------------------------
>Comment By: xqt (xqt)
Date: 2010-09-16 13:21
Message:
done in r8566
I change this line with direct time class methods. It should work now.
Well I should declare py 2.4 as deprecated ;)
----------------------------------------------------------------------
Comment By: Daniel Barrett (djbarrett)
Date: 2010-09-15 21:08
Message:
I'm sorry, our systems run CentOS Linux which comes with a specific Python
version that I do not have access to change.
----------------------------------------------------------------------
Comment By: xqt (xqt)
Date: 2010-09-15 20:10
Message:
I am not shure but maybe py 2.4 isn't able to handle such class construct.
I'll revert this changes for now.
Could you try it with a newer python?
----------------------------------------------------------------------
Comment By: Daniel Barrett (djbarrett)
Date: 2010-09-15 19:46
Message:
One more:
>>> wp.Timestamp.fromtimestampformat(t)
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/local/pywikipedia/pywikibot/__init__.py", line 47, in
fromtimestampformat
return cls.strptime(ts, cls.mediawikiTSFormat)
AttributeError: type object 'Timestamp' has no attribute 'strptime'
----------------------------------------------------------------------
Comment By: Daniel Barrett (djbarrett)
Date: 2010-09-15 19:45
Message:
OK trying again:
import time
import wikipedia as wp
t = time.strftime("%Y%m%d%H%M%S",time.gmtime())
t
Produces:
'20100915174350'
Then:
wp.Timestamp
still produces:
<class 'pywikibot.Timestamp'>
----------------------------------------------------------------------
Comment By: Daniel Barrett (djbarrett)
Date: 2010-09-15 19:42
Message:
I don't know Python, so I am just repeating what you wrote. First I did:
$ python
Python 2.4.3 (#1, Sep 3 2009, 15:37:37)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-46)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
Then I did:
import wikipedia as wp
t = time.strftime("%Y%m%d%H%M%S",time.gmtime())
Produces:
Traceback (most recent call last):
File "<stdin>", line 1, in ?
NameError: name 'time' is not defined
wp.Timestamp.
Produces:
<class 'pywikibot.Timestamp'>
Then I did:
import sys
sys.path
Produces:
['', '/usr/lib64/python24.zip', '/usr/lib64/python2.4',
'/usr/lib64/python2.4/plat-linux2', '/usr/lib64/python2.4/lib-tk',
'/usr/lib64/python2.4/lib-dynload', '/usr/lib64/python2.4/site-packages',
'/usr/lib64/python2.4/site-packages/gtk-2.0',
'/usr/lib/python2.4/site-packages',
'/usr/local/pywikipedia/userinterfaces',
'/usr/local/pywikipedia/families']
----------------------------------------------------------------------
Comment By: xqt (xqt)
Date: 2010-09-15 19:34
Message:
I haven't found this error. Could you verify some things via idle:
import wikipedia as wp
t = time.strftime("%Y%m%d%H%M%S",time.gmtime())
t
this should print sth like
'20100915172517'
wp.Timestamp.
Please hold this dot and you'll see availlable methods
wp.Timestamp.fromtimestampformat(t)
produces
Timestamp(2010, 9, 15, 17, 31, 53)
str(wp.Timestamp.fromtimestampformat(t))
produces
'2010-09-15T17:31:53Z'
Please also give me your sys.path()
----------------------------------------------------------------------
Comment By: Daniel Barrett (djbarrett)
Date: 2010-09-15 17:22
Message:
The bug was introduced in revision 8562:
svn diff -c8562
Index: wikipedia.py
===================================================================
--- wikipedia.py (revision 8561)
+++ wikipedia.py (revision 8562)
@@ -2559,8 +2559,11 @@
dataQuery = self._versionhistoryearliest
else:
thisHistoryDone = True
- elif not hasattr(self, '_versionhistory') or forceReload:
+ elif not hasattr(self, '_versionhistory') or forceReload or \
+ len(self._versionhistory) < revCount:
self._versionhistory = []
+ # ?? does not load if len(self._versionhistory) > revCount
+ # shouldn't it
elif getAll and len(self._versionhistory) == revCount:
# Cause a reload, or at least make the loop run
thisHistoryDone = False
@@ -3907,7 +3910,7 @@
successful = False
for page2 in self.pages:
if page2.sectionFreeTitle() == page.sectionFreeTitle():
- if not (hasattr(page2,'_contents') or
hasattr(page2,'_getexception')) or self.force:
+ if not (hasattr(page2,'_contents') or hasattr(page2,
'_getexception')) or self.force:
page2.editRestriction = entry.editRestriction
page2.moveRestriction = entry.moveRestriction
if editRestriction == 'autoconfirmed':
@@ -3917,6 +3920,7 @@
page2._ipedit = ipedit
page2._revisionId = revisionId
page2._editTime = timestamp
+ page2._versionhistory = [(revisionId,
str(Timestamp.fromtimestampformat(timestamp)), username, entry.comment)]
section = page2.section()
# Store the content
page2._contents = text
----------------------------------------------------------------------
Comment By: Daniel Barrett (djbarrett)
Date: 2010-09-15 17:16
Message:
Note: the example did create category "DD" but did not recategorize the
page in the AABBCC category. (There is only one page in the category.)
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3066934&group_…
Bugs item #3066765, was opened at 2010-09-15 11:02
Message generated for change (Comment added) made by dmitrynikitin
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3066765&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: Works For Me
Priority: 5
Private: No
Submitted By: Dmitry Nikitin (dmitrynikitin)
Assigned to: xqt (xqt)
Summary: clean_sandbox.py: TypeError: 'int' object is unsubscriptable
Initial Comment:
>>python clean_sandbox.py
Traceback (most recent call last):
File "clean_sandbox.py", line 212, in <module>
main()
File "clean_sandbox.py", line 206, in main
bot.run()
File "clean_sandbox.py", line 170, in run
diff = minutesDiff(sandboxPage.editTime(), time.strftime("%Y%m%d%H%M%S", time.gmtime()))
File "clean_sandbox.py", line 138, in minutesDiff
t1 = (((int(time1[0:4]) * 12 + int(time1[4:6])) * 30 +
TypeError: 'int' object is unsubscriptable
-------------------------------------------------------
Pywikipedia [http] trunk/pywikipedia (r8560, 2010/09/15, 10:11:05)
Python 2.6.5 (r265:79063, Apr 16 2010, 13:57:41)
[GCC 4.4.3]
config-settings:
use_api = True
use_api_login = True
----------------------------------------------------------------------
>Comment By: Dmitry Nikitin (dmitrynikitin)
Date: 2010-09-16 08:01
Message:
I've closed the bug. All work in r8564
----------------------------------------------------------------------
Comment By: xqt (xqt)
Date: 2010-09-15 17:44
Message:
hm, there is nothing left to do and the editTime() has gone. Please come
back if this bug occures again
----------------------------------------------------------------------
Comment By: Dmitry Nikitin (dmitrynikitin)
Date: 2010-09-15 17:32
Message:
>>python clean_sandbox.py -verbose -lang:ru
Pywikipediabot [http] trunk/pywikipedia (r8564, 2010/09/15, 17:16:53)
Python 2.6.5 (r265:79063, Apr 16 2010, 13:57:41)
[GCC 4.4.3]
Sleeping for 1.0 seconds, 2010-09-15 21:31:10
==== API action:query ====
inprop: protection|talkid|subjectid|url|readable
rvprop: content|ids|flags|timestamp|user|comment|size
prop: revisions|info
titles: Википедия:Песочница
rvlimit: 1
----------------
Requesting API query from wikipedia:ru
getting huge siprop magicwords...
==== API action:query ====
meta: siteinfo
siprop: magicwords
----------------
Requesting API query from wikipedia:ru
The sandbox is still clean, no change necessary.
Done.
----------------------------------------------------------------------
Comment By: xqt (xqt)
Date: 2010-09-15 17:18
Message:
It seem sandboxPage.editTime() is not valid. Please try 8564 and tell me
the -verbose result (and your sandbox you are working on)
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3066765&group_…
Bugs item #2968140, was opened at 2010-03-10 20:48
Message generated for change (Comment added) made by ganz-ru
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2968140&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: Wont Fix
Priority: 5
Private: No
Submitted By: JAn (jandudik)
Assigned to: xqt (xqt)
Summary: unrecognized dismbiguation templates
Initial Comment:
In http://en.wikipedia.org/wiki/MediaWiki:Disambiguationspage there are some templates which are not as links. bot cannot recognize it and removes links to some disambiguations with templates like {{shiplist}} or {{surname}}.
But these articles are in some languages as disambigs, in some not. Maybe do something for recognize these as semi-disambiguations?
----------------------------------------------------------------------
Comment By: GanZ (ganz-ru)
Date: 2010-09-16 01:45
Message:
Example of incorrect work:
http://en.wikipedia.org/w/index.php?title=Gari%2C_Russia&action=historysubm…
. Page en:Gari,_Russia has {{SIA}} and it should be linked with
ru:Гари_(Россия) that is "true" disambiguation. But the bot
changed link into another, non-disambiguation page. And It wasn't in
"force" mode.
----------------------------------------------------------------------
Comment By: xqt (xqt)
Date: 2010-09-15 22:24
Message:
on other sites these pages aren't marked as disambigs and this would lead
in removing interwiki links there.
There is a ways to not remove these links: do not use -force in
-autonomous mode!
Please be free to use the new -cleanup option instead I implemented this
week (and read the mail list). This does not touch disambig mismatches.
----------------------------------------------------------------------
Comment By: GanZ (ganz-ru)
Date: 2010-09-15 20:19
Message:
I join to the request of JAn. In en.wiki there is a special type of
disambigiations - {{SIA}}. When Script work automatically it concerns pages
with {{SIA}} as non-disambig and can remove correct interwikis.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2968140&group_…
Bugs item #3066934, was opened at 2010-09-15 11:12
Message generated for change (Comment added) made by djbarrett
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3066934&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: 7
Private: No
Submitted By: Daniel Barrett (djbarrett)
Assigned to: xqt (xqt)
Summary: AttributeError: type object 'Timestamp' has no attribute 'st
Initial Comment:
category.py is throwing the error in the Summary. MediaWiki 1.15.4,
$ sudo python category.py move -from:"AABBCC" -to:"DD"
Traceback (most recent call last):
File "/usr/local/pywikipedia/pagegenerators.py", line 1238, in __iter__
for loaded_page in self.preload(somePages):
File "/usr/local/pywikipedia/pagegenerators.py", line 1257, in preload
pywikibot.getall(site, pagesThisSite)
File "/usr/local/pywikipedia/wikipedia.py", line 4208, in getall
_GetAll(site, pages, throttle, force).run()
File "/usr/local/pywikipedia/wikipedia.py", line 3887, in run
xml.sax.parseString(data, handler)
File "/usr/lib64/python2.4/xml/sax/__init__.py", line 49, in parseString
parser.parse(inpsrc)
File "/usr/lib64/python2.4/xml/sax/expatreader.py", line 107, in parse
xmlreader.IncrementalParser.parse(self, source)
File "/usr/lib64/python2.4/xml/sax/xmlreader.py", line 123, in parse
self.feed(buffer)
File "/usr/lib64/python2.4/xml/sax/expatreader.py", line 207, in feed
self._parser.Parse(data, isFinal)
File "/usr/lib64/python2.4/xml/sax/expatreader.py", line 303, in end_element
self._cont_handler.endElement(name)
File "/usr/local/pywikipedia/xmlreader.py", line 202, in endElement
self.callback(entry)
File "/usr/local/pywikipedia/wikipedia.py", line 3923, in oneDone
page2._versionhistory = [(revisionId, str(Timestamp.fromtimestampformat(timestamp)), username, entry.comment)]
File "/usr/local/pywikipedia/pywikibot/__init__.py", line 47, in fromtimestampformat
return cls.strptime(ts, cls.mediawikiTSFormat)
AttributeError: type object 'Timestamp' has no attribute 'strptime'
type object 'Timestamp' has no attribute 'strptime'
Getting [[Category:AABBCC]]...
Getting [[Category:AABBCC]]...
Couldn't delete Category:AABBCC - not empty.
$ python version.py
Pywikipedia [http] trunk/pywikipedia (r8562, 2010/09/15, 12:54:46)
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
----------------------------------------------------------------------
>Comment By: Daniel Barrett (djbarrett)
Date: 2010-09-15 15:08
Message:
I'm sorry, our systems run CentOS Linux which comes with a specific Python
version that I do not have access to change.
----------------------------------------------------------------------
Comment By: xqt (xqt)
Date: 2010-09-15 14:10
Message:
I am not shure but maybe py 2.4 isn't able to handle such class construct.
I'll revert this changes for now.
Could you try it with a newer python?
----------------------------------------------------------------------
Comment By: Daniel Barrett (djbarrett)
Date: 2010-09-15 13:46
Message:
One more:
>>> wp.Timestamp.fromtimestampformat(t)
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/local/pywikipedia/pywikibot/__init__.py", line 47, in
fromtimestampformat
return cls.strptime(ts, cls.mediawikiTSFormat)
AttributeError: type object 'Timestamp' has no attribute 'strptime'
----------------------------------------------------------------------
Comment By: Daniel Barrett (djbarrett)
Date: 2010-09-15 13:45
Message:
OK trying again:
import time
import wikipedia as wp
t = time.strftime("%Y%m%d%H%M%S",time.gmtime())
t
Produces:
'20100915174350'
Then:
wp.Timestamp
still produces:
<class 'pywikibot.Timestamp'>
----------------------------------------------------------------------
Comment By: Daniel Barrett (djbarrett)
Date: 2010-09-15 13:42
Message:
I don't know Python, so I am just repeating what you wrote. First I did:
$ python
Python 2.4.3 (#1, Sep 3 2009, 15:37:37)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-46)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
Then I did:
import wikipedia as wp
t = time.strftime("%Y%m%d%H%M%S",time.gmtime())
Produces:
Traceback (most recent call last):
File "<stdin>", line 1, in ?
NameError: name 'time' is not defined
wp.Timestamp.
Produces:
<class 'pywikibot.Timestamp'>
Then I did:
import sys
sys.path
Produces:
['', '/usr/lib64/python24.zip', '/usr/lib64/python2.4',
'/usr/lib64/python2.4/plat-linux2', '/usr/lib64/python2.4/lib-tk',
'/usr/lib64/python2.4/lib-dynload', '/usr/lib64/python2.4/site-packages',
'/usr/lib64/python2.4/site-packages/gtk-2.0',
'/usr/lib/python2.4/site-packages',
'/usr/local/pywikipedia/userinterfaces',
'/usr/local/pywikipedia/families']
----------------------------------------------------------------------
Comment By: xqt (xqt)
Date: 2010-09-15 13:34
Message:
I haven't found this error. Could you verify some things via idle:
import wikipedia as wp
t = time.strftime("%Y%m%d%H%M%S",time.gmtime())
t
this should print sth like
'20100915172517'
wp.Timestamp.
Please hold this dot and you'll see availlable methods
wp.Timestamp.fromtimestampformat(t)
produces
Timestamp(2010, 9, 15, 17, 31, 53)
str(wp.Timestamp.fromtimestampformat(t))
produces
'2010-09-15T17:31:53Z'
Please also give me your sys.path()
----------------------------------------------------------------------
Comment By: Daniel Barrett (djbarrett)
Date: 2010-09-15 11:22
Message:
The bug was introduced in revision 8562:
svn diff -c8562
Index: wikipedia.py
===================================================================
--- wikipedia.py (revision 8561)
+++ wikipedia.py (revision 8562)
@@ -2559,8 +2559,11 @@
dataQuery = self._versionhistoryearliest
else:
thisHistoryDone = True
- elif not hasattr(self, '_versionhistory') or forceReload:
+ elif not hasattr(self, '_versionhistory') or forceReload or \
+ len(self._versionhistory) < revCount:
self._versionhistory = []
+ # ?? does not load if len(self._versionhistory) > revCount
+ # shouldn't it
elif getAll and len(self._versionhistory) == revCount:
# Cause a reload, or at least make the loop run
thisHistoryDone = False
@@ -3907,7 +3910,7 @@
successful = False
for page2 in self.pages:
if page2.sectionFreeTitle() == page.sectionFreeTitle():
- if not (hasattr(page2,'_contents') or
hasattr(page2,'_getexception')) or self.force:
+ if not (hasattr(page2,'_contents') or hasattr(page2,
'_getexception')) or self.force:
page2.editRestriction = entry.editRestriction
page2.moveRestriction = entry.moveRestriction
if editRestriction == 'autoconfirmed':
@@ -3917,6 +3920,7 @@
page2._ipedit = ipedit
page2._revisionId = revisionId
page2._editTime = timestamp
+ page2._versionhistory = [(revisionId,
str(Timestamp.fromtimestampformat(timestamp)), username, entry.comment)]
section = page2.section()
# Store the content
page2._contents = text
----------------------------------------------------------------------
Comment By: Daniel Barrett (djbarrett)
Date: 2010-09-15 11:16
Message:
Note: the example did create category "DD" but did not recategorize the
page in the AABBCC category. (There is only one page in the category.)
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3066934&group_…
Bugs item #2968140, was opened at 2010-03-10 18:48
Message generated for change (Settings changed) made by xqt
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2968140&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: Wont Fix
Priority: 5
Private: No
Submitted By: JAn (jandudik)
Assigned to: xqt (xqt)
Summary: unrecognized dismbiguation templates
Initial Comment:
In http://en.wikipedia.org/wiki/MediaWiki:Disambiguationspage there are some templates which are not as links. bot cannot recognize it and removes links to some disambiguations with templates like {{shiplist}} or {{surname}}.
But these articles are in some languages as disambigs, in some not. Maybe do something for recognize these as semi-disambiguations?
----------------------------------------------------------------------
Comment By: xqt (xqt)
Date: 2010-09-15 20:24
Message:
on other sites these pages aren't marked as disambigs and this would lead
in removing interwiki links there.
There is a ways to not remove these links: do not use -force in
-autonomous mode!
Please be free to use the new -cleanup option instead I implemented this
week (and read the mail list). This does not touch disambig mismatches.
----------------------------------------------------------------------
Comment By: GanZ (ganz-ru)
Date: 2010-09-15 18:19
Message:
I join to the request of JAn. In en.wiki there is a special type of
disambigiations - {{SIA}}. When Script work automatically it concerns pages
with {{SIA}} as non-disambig and can remove correct interwikis.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2968140&group_…
Bugs item #2968140, was opened at 2010-03-10 18:48
Message generated for change (Comment added) made by xqt
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2968140&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: Pending
>Resolution: Wont Fix
Priority: 5
Private: No
Submitted By: JAn (jandudik)
>Assigned to: xqt (xqt)
Summary: unrecognized dismbiguation templates
Initial Comment:
In http://en.wikipedia.org/wiki/MediaWiki:Disambiguationspage there are some templates which are not as links. bot cannot recognize it and removes links to some disambiguations with templates like {{shiplist}} or {{surname}}.
But these articles are in some languages as disambigs, in some not. Maybe do something for recognize these as semi-disambiguations?
----------------------------------------------------------------------
>Comment By: xqt (xqt)
Date: 2010-09-15 20:24
Message:
on other sites these pages aren't marked as disambigs and this would lead
in removing interwiki links there.
There is a ways to not remove these links: do not use -force in
-autonomous mode!
Please be free to use the new -cleanup option instead I implemented this
week (and read the mail list). This does not touch disambig mismatches.
----------------------------------------------------------------------
Comment By: GanZ (ganz-ru)
Date: 2010-09-15 18:19
Message:
I join to the request of JAn. In en.wiki there is a special type of
disambigiations - {{SIA}}. When Script work automatically it concerns pages
with {{SIA}} as non-disambig and can remove correct interwikis.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2968140&group_…
Bugs item #3066934, was opened at 2010-09-15 17:12
Message generated for change (Settings changed) made by xqt
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3066934&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: 7
Private: No
Submitted By: Daniel Barrett (djbarrett)
Assigned to: xqt (xqt)
Summary: AttributeError: type object 'Timestamp' has no attribute 'st
Initial Comment:
category.py is throwing the error in the Summary. MediaWiki 1.15.4,
$ sudo python category.py move -from:"AABBCC" -to:"DD"
Traceback (most recent call last):
File "/usr/local/pywikipedia/pagegenerators.py", line 1238, in __iter__
for loaded_page in self.preload(somePages):
File "/usr/local/pywikipedia/pagegenerators.py", line 1257, in preload
pywikibot.getall(site, pagesThisSite)
File "/usr/local/pywikipedia/wikipedia.py", line 4208, in getall
_GetAll(site, pages, throttle, force).run()
File "/usr/local/pywikipedia/wikipedia.py", line 3887, in run
xml.sax.parseString(data, handler)
File "/usr/lib64/python2.4/xml/sax/__init__.py", line 49, in parseString
parser.parse(inpsrc)
File "/usr/lib64/python2.4/xml/sax/expatreader.py", line 107, in parse
xmlreader.IncrementalParser.parse(self, source)
File "/usr/lib64/python2.4/xml/sax/xmlreader.py", line 123, in parse
self.feed(buffer)
File "/usr/lib64/python2.4/xml/sax/expatreader.py", line 207, in feed
self._parser.Parse(data, isFinal)
File "/usr/lib64/python2.4/xml/sax/expatreader.py", line 303, in end_element
self._cont_handler.endElement(name)
File "/usr/local/pywikipedia/xmlreader.py", line 202, in endElement
self.callback(entry)
File "/usr/local/pywikipedia/wikipedia.py", line 3923, in oneDone
page2._versionhistory = [(revisionId, str(Timestamp.fromtimestampformat(timestamp)), username, entry.comment)]
File "/usr/local/pywikipedia/pywikibot/__init__.py", line 47, in fromtimestampformat
return cls.strptime(ts, cls.mediawikiTSFormat)
AttributeError: type object 'Timestamp' has no attribute 'strptime'
type object 'Timestamp' has no attribute 'strptime'
Getting [[Category:AABBCC]]...
Getting [[Category:AABBCC]]...
Couldn't delete Category:AABBCC - not empty.
$ python version.py
Pywikipedia [http] trunk/pywikipedia (r8562, 2010/09/15, 12:54:46)
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
----------------------------------------------------------------------
Comment By: xqt (xqt)
Date: 2010-09-15 20:10
Message:
I am not shure but maybe py 2.4 isn't able to handle such class construct.
I'll revert this changes for now.
Could you try it with a newer python?
----------------------------------------------------------------------
Comment By: Daniel Barrett (djbarrett)
Date: 2010-09-15 19:46
Message:
One more:
>>> wp.Timestamp.fromtimestampformat(t)
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/local/pywikipedia/pywikibot/__init__.py", line 47, in
fromtimestampformat
return cls.strptime(ts, cls.mediawikiTSFormat)
AttributeError: type object 'Timestamp' has no attribute 'strptime'
----------------------------------------------------------------------
Comment By: Daniel Barrett (djbarrett)
Date: 2010-09-15 19:45
Message:
OK trying again:
import time
import wikipedia as wp
t = time.strftime("%Y%m%d%H%M%S",time.gmtime())
t
Produces:
'20100915174350'
Then:
wp.Timestamp
still produces:
<class 'pywikibot.Timestamp'>
----------------------------------------------------------------------
Comment By: Daniel Barrett (djbarrett)
Date: 2010-09-15 19:42
Message:
I don't know Python, so I am just repeating what you wrote. First I did:
$ python
Python 2.4.3 (#1, Sep 3 2009, 15:37:37)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-46)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
Then I did:
import wikipedia as wp
t = time.strftime("%Y%m%d%H%M%S",time.gmtime())
Produces:
Traceback (most recent call last):
File "<stdin>", line 1, in ?
NameError: name 'time' is not defined
wp.Timestamp.
Produces:
<class 'pywikibot.Timestamp'>
Then I did:
import sys
sys.path
Produces:
['', '/usr/lib64/python24.zip', '/usr/lib64/python2.4',
'/usr/lib64/python2.4/plat-linux2', '/usr/lib64/python2.4/lib-tk',
'/usr/lib64/python2.4/lib-dynload', '/usr/lib64/python2.4/site-packages',
'/usr/lib64/python2.4/site-packages/gtk-2.0',
'/usr/lib/python2.4/site-packages',
'/usr/local/pywikipedia/userinterfaces',
'/usr/local/pywikipedia/families']
----------------------------------------------------------------------
Comment By: xqt (xqt)
Date: 2010-09-15 19:34
Message:
I haven't found this error. Could you verify some things via idle:
import wikipedia as wp
t = time.strftime("%Y%m%d%H%M%S",time.gmtime())
t
this should print sth like
'20100915172517'
wp.Timestamp.
Please hold this dot and you'll see availlable methods
wp.Timestamp.fromtimestampformat(t)
produces
Timestamp(2010, 9, 15, 17, 31, 53)
str(wp.Timestamp.fromtimestampformat(t))
produces
'2010-09-15T17:31:53Z'
Please also give me your sys.path()
----------------------------------------------------------------------
Comment By: Daniel Barrett (djbarrett)
Date: 2010-09-15 17:22
Message:
The bug was introduced in revision 8562:
svn diff -c8562
Index: wikipedia.py
===================================================================
--- wikipedia.py (revision 8561)
+++ wikipedia.py (revision 8562)
@@ -2559,8 +2559,11 @@
dataQuery = self._versionhistoryearliest
else:
thisHistoryDone = True
- elif not hasattr(self, '_versionhistory') or forceReload:
+ elif not hasattr(self, '_versionhistory') or forceReload or \
+ len(self._versionhistory) < revCount:
self._versionhistory = []
+ # ?? does not load if len(self._versionhistory) > revCount
+ # shouldn't it
elif getAll and len(self._versionhistory) == revCount:
# Cause a reload, or at least make the loop run
thisHistoryDone = False
@@ -3907,7 +3910,7 @@
successful = False
for page2 in self.pages:
if page2.sectionFreeTitle() == page.sectionFreeTitle():
- if not (hasattr(page2,'_contents') or
hasattr(page2,'_getexception')) or self.force:
+ if not (hasattr(page2,'_contents') or hasattr(page2,
'_getexception')) or self.force:
page2.editRestriction = entry.editRestriction
page2.moveRestriction = entry.moveRestriction
if editRestriction == 'autoconfirmed':
@@ -3917,6 +3920,7 @@
page2._ipedit = ipedit
page2._revisionId = revisionId
page2._editTime = timestamp
+ page2._versionhistory = [(revisionId,
str(Timestamp.fromtimestampformat(timestamp)), username, entry.comment)]
section = page2.section()
# Store the content
page2._contents = text
----------------------------------------------------------------------
Comment By: Daniel Barrett (djbarrett)
Date: 2010-09-15 17:16
Message:
Note: the example did create category "DD" but did not recategorize the
page in the AABBCC category. (There is only one page in the category.)
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3066934&group_…
Bugs item #3066934, was opened at 2010-09-15 17:12
Message generated for change (Settings changed) made by xqt
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3066934&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: Open
Resolution: None
Priority: 7
Private: No
Submitted By: Daniel Barrett (djbarrett)
Assigned to: xqt (xqt)
Summary: AttributeError: type object 'Timestamp' has no attribute 'st
Initial Comment:
category.py is throwing the error in the Summary. MediaWiki 1.15.4,
$ sudo python category.py move -from:"AABBCC" -to:"DD"
Traceback (most recent call last):
File "/usr/local/pywikipedia/pagegenerators.py", line 1238, in __iter__
for loaded_page in self.preload(somePages):
File "/usr/local/pywikipedia/pagegenerators.py", line 1257, in preload
pywikibot.getall(site, pagesThisSite)
File "/usr/local/pywikipedia/wikipedia.py", line 4208, in getall
_GetAll(site, pages, throttle, force).run()
File "/usr/local/pywikipedia/wikipedia.py", line 3887, in run
xml.sax.parseString(data, handler)
File "/usr/lib64/python2.4/xml/sax/__init__.py", line 49, in parseString
parser.parse(inpsrc)
File "/usr/lib64/python2.4/xml/sax/expatreader.py", line 107, in parse
xmlreader.IncrementalParser.parse(self, source)
File "/usr/lib64/python2.4/xml/sax/xmlreader.py", line 123, in parse
self.feed(buffer)
File "/usr/lib64/python2.4/xml/sax/expatreader.py", line 207, in feed
self._parser.Parse(data, isFinal)
File "/usr/lib64/python2.4/xml/sax/expatreader.py", line 303, in end_element
self._cont_handler.endElement(name)
File "/usr/local/pywikipedia/xmlreader.py", line 202, in endElement
self.callback(entry)
File "/usr/local/pywikipedia/wikipedia.py", line 3923, in oneDone
page2._versionhistory = [(revisionId, str(Timestamp.fromtimestampformat(timestamp)), username, entry.comment)]
File "/usr/local/pywikipedia/pywikibot/__init__.py", line 47, in fromtimestampformat
return cls.strptime(ts, cls.mediawikiTSFormat)
AttributeError: type object 'Timestamp' has no attribute 'strptime'
type object 'Timestamp' has no attribute 'strptime'
Getting [[Category:AABBCC]]...
Getting [[Category:AABBCC]]...
Couldn't delete Category:AABBCC - not empty.
$ python version.py
Pywikipedia [http] trunk/pywikipedia (r8562, 2010/09/15, 12:54:46)
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
----------------------------------------------------------------------
Comment By: xqt (xqt)
Date: 2010-09-15 20:10
Message:
I am not shure but maybe py 2.4 isn't able to handle such class construct.
I'll revert this changes for now.
Could you try it with a newer python?
----------------------------------------------------------------------
Comment By: Daniel Barrett (djbarrett)
Date: 2010-09-15 19:46
Message:
One more:
>>> wp.Timestamp.fromtimestampformat(t)
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/local/pywikipedia/pywikibot/__init__.py", line 47, in
fromtimestampformat
return cls.strptime(ts, cls.mediawikiTSFormat)
AttributeError: type object 'Timestamp' has no attribute 'strptime'
----------------------------------------------------------------------
Comment By: Daniel Barrett (djbarrett)
Date: 2010-09-15 19:45
Message:
OK trying again:
import time
import wikipedia as wp
t = time.strftime("%Y%m%d%H%M%S",time.gmtime())
t
Produces:
'20100915174350'
Then:
wp.Timestamp
still produces:
<class 'pywikibot.Timestamp'>
----------------------------------------------------------------------
Comment By: Daniel Barrett (djbarrett)
Date: 2010-09-15 19:42
Message:
I don't know Python, so I am just repeating what you wrote. First I did:
$ python
Python 2.4.3 (#1, Sep 3 2009, 15:37:37)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-46)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
Then I did:
import wikipedia as wp
t = time.strftime("%Y%m%d%H%M%S",time.gmtime())
Produces:
Traceback (most recent call last):
File "<stdin>", line 1, in ?
NameError: name 'time' is not defined
wp.Timestamp.
Produces:
<class 'pywikibot.Timestamp'>
Then I did:
import sys
sys.path
Produces:
['', '/usr/lib64/python24.zip', '/usr/lib64/python2.4',
'/usr/lib64/python2.4/plat-linux2', '/usr/lib64/python2.4/lib-tk',
'/usr/lib64/python2.4/lib-dynload', '/usr/lib64/python2.4/site-packages',
'/usr/lib64/python2.4/site-packages/gtk-2.0',
'/usr/lib/python2.4/site-packages',
'/usr/local/pywikipedia/userinterfaces',
'/usr/local/pywikipedia/families']
----------------------------------------------------------------------
Comment By: xqt (xqt)
Date: 2010-09-15 19:34
Message:
I haven't found this error. Could you verify some things via idle:
import wikipedia as wp
t = time.strftime("%Y%m%d%H%M%S",time.gmtime())
t
this should print sth like
'20100915172517'
wp.Timestamp.
Please hold this dot and you'll see availlable methods
wp.Timestamp.fromtimestampformat(t)
produces
Timestamp(2010, 9, 15, 17, 31, 53)
str(wp.Timestamp.fromtimestampformat(t))
produces
'2010-09-15T17:31:53Z'
Please also give me your sys.path()
----------------------------------------------------------------------
Comment By: Daniel Barrett (djbarrett)
Date: 2010-09-15 17:22
Message:
The bug was introduced in revision 8562:
svn diff -c8562
Index: wikipedia.py
===================================================================
--- wikipedia.py (revision 8561)
+++ wikipedia.py (revision 8562)
@@ -2559,8 +2559,11 @@
dataQuery = self._versionhistoryearliest
else:
thisHistoryDone = True
- elif not hasattr(self, '_versionhistory') or forceReload:
+ elif not hasattr(self, '_versionhistory') or forceReload or \
+ len(self._versionhistory) < revCount:
self._versionhistory = []
+ # ?? does not load if len(self._versionhistory) > revCount
+ # shouldn't it
elif getAll and len(self._versionhistory) == revCount:
# Cause a reload, or at least make the loop run
thisHistoryDone = False
@@ -3907,7 +3910,7 @@
successful = False
for page2 in self.pages:
if page2.sectionFreeTitle() == page.sectionFreeTitle():
- if not (hasattr(page2,'_contents') or
hasattr(page2,'_getexception')) or self.force:
+ if not (hasattr(page2,'_contents') or hasattr(page2,
'_getexception')) or self.force:
page2.editRestriction = entry.editRestriction
page2.moveRestriction = entry.moveRestriction
if editRestriction == 'autoconfirmed':
@@ -3917,6 +3920,7 @@
page2._ipedit = ipedit
page2._revisionId = revisionId
page2._editTime = timestamp
+ page2._versionhistory = [(revisionId,
str(Timestamp.fromtimestampformat(timestamp)), username, entry.comment)]
section = page2.section()
# Store the content
page2._contents = text
----------------------------------------------------------------------
Comment By: Daniel Barrett (djbarrett)
Date: 2010-09-15 17:16
Message:
Note: the example did create category "DD" but did not recategorize the
page in the AABBCC category. (There is only one page in the category.)
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3066934&group_…
Bugs item #3066934, was opened at 2010-09-15 17:12
Message generated for change (Comment added) made by xqt
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3066934&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: Pending
Resolution: None
Priority: 7
Private: No
Submitted By: Daniel Barrett (djbarrett)
Assigned to: xqt (xqt)
Summary: AttributeError: type object 'Timestamp' has no attribute 'st
Initial Comment:
category.py is throwing the error in the Summary. MediaWiki 1.15.4,
$ sudo python category.py move -from:"AABBCC" -to:"DD"
Traceback (most recent call last):
File "/usr/local/pywikipedia/pagegenerators.py", line 1238, in __iter__
for loaded_page in self.preload(somePages):
File "/usr/local/pywikipedia/pagegenerators.py", line 1257, in preload
pywikibot.getall(site, pagesThisSite)
File "/usr/local/pywikipedia/wikipedia.py", line 4208, in getall
_GetAll(site, pages, throttle, force).run()
File "/usr/local/pywikipedia/wikipedia.py", line 3887, in run
xml.sax.parseString(data, handler)
File "/usr/lib64/python2.4/xml/sax/__init__.py", line 49, in parseString
parser.parse(inpsrc)
File "/usr/lib64/python2.4/xml/sax/expatreader.py", line 107, in parse
xmlreader.IncrementalParser.parse(self, source)
File "/usr/lib64/python2.4/xml/sax/xmlreader.py", line 123, in parse
self.feed(buffer)
File "/usr/lib64/python2.4/xml/sax/expatreader.py", line 207, in feed
self._parser.Parse(data, isFinal)
File "/usr/lib64/python2.4/xml/sax/expatreader.py", line 303, in end_element
self._cont_handler.endElement(name)
File "/usr/local/pywikipedia/xmlreader.py", line 202, in endElement
self.callback(entry)
File "/usr/local/pywikipedia/wikipedia.py", line 3923, in oneDone
page2._versionhistory = [(revisionId, str(Timestamp.fromtimestampformat(timestamp)), username, entry.comment)]
File "/usr/local/pywikipedia/pywikibot/__init__.py", line 47, in fromtimestampformat
return cls.strptime(ts, cls.mediawikiTSFormat)
AttributeError: type object 'Timestamp' has no attribute 'strptime'
type object 'Timestamp' has no attribute 'strptime'
Getting [[Category:AABBCC]]...
Getting [[Category:AABBCC]]...
Couldn't delete Category:AABBCC - not empty.
$ python version.py
Pywikipedia [http] trunk/pywikipedia (r8562, 2010/09/15, 12:54:46)
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
----------------------------------------------------------------------
>Comment By: xqt (xqt)
Date: 2010-09-15 20:10
Message:
I am not shure but maybe py 2.4 isn't able to handle such class construct.
I'll revert this changes for now.
Could you try it with a newer python?
----------------------------------------------------------------------
Comment By: Daniel Barrett (djbarrett)
Date: 2010-09-15 19:46
Message:
One more:
>>> wp.Timestamp.fromtimestampformat(t)
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/local/pywikipedia/pywikibot/__init__.py", line 47, in
fromtimestampformat
return cls.strptime(ts, cls.mediawikiTSFormat)
AttributeError: type object 'Timestamp' has no attribute 'strptime'
----------------------------------------------------------------------
Comment By: Daniel Barrett (djbarrett)
Date: 2010-09-15 19:45
Message:
OK trying again:
import time
import wikipedia as wp
t = time.strftime("%Y%m%d%H%M%S",time.gmtime())
t
Produces:
'20100915174350'
Then:
wp.Timestamp
still produces:
<class 'pywikibot.Timestamp'>
----------------------------------------------------------------------
Comment By: Daniel Barrett (djbarrett)
Date: 2010-09-15 19:42
Message:
I don't know Python, so I am just repeating what you wrote. First I did:
$ python
Python 2.4.3 (#1, Sep 3 2009, 15:37:37)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-46)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
Then I did:
import wikipedia as wp
t = time.strftime("%Y%m%d%H%M%S",time.gmtime())
Produces:
Traceback (most recent call last):
File "<stdin>", line 1, in ?
NameError: name 'time' is not defined
wp.Timestamp.
Produces:
<class 'pywikibot.Timestamp'>
Then I did:
import sys
sys.path
Produces:
['', '/usr/lib64/python24.zip', '/usr/lib64/python2.4',
'/usr/lib64/python2.4/plat-linux2', '/usr/lib64/python2.4/lib-tk',
'/usr/lib64/python2.4/lib-dynload', '/usr/lib64/python2.4/site-packages',
'/usr/lib64/python2.4/site-packages/gtk-2.0',
'/usr/lib/python2.4/site-packages',
'/usr/local/pywikipedia/userinterfaces',
'/usr/local/pywikipedia/families']
----------------------------------------------------------------------
Comment By: xqt (xqt)
Date: 2010-09-15 19:34
Message:
I haven't found this error. Could you verify some things via idle:
import wikipedia as wp
t = time.strftime("%Y%m%d%H%M%S",time.gmtime())
t
this should print sth like
'20100915172517'
wp.Timestamp.
Please hold this dot and you'll see availlable methods
wp.Timestamp.fromtimestampformat(t)
produces
Timestamp(2010, 9, 15, 17, 31, 53)
str(wp.Timestamp.fromtimestampformat(t))
produces
'2010-09-15T17:31:53Z'
Please also give me your sys.path()
----------------------------------------------------------------------
Comment By: Daniel Barrett (djbarrett)
Date: 2010-09-15 17:22
Message:
The bug was introduced in revision 8562:
svn diff -c8562
Index: wikipedia.py
===================================================================
--- wikipedia.py (revision 8561)
+++ wikipedia.py (revision 8562)
@@ -2559,8 +2559,11 @@
dataQuery = self._versionhistoryearliest
else:
thisHistoryDone = True
- elif not hasattr(self, '_versionhistory') or forceReload:
+ elif not hasattr(self, '_versionhistory') or forceReload or \
+ len(self._versionhistory) < revCount:
self._versionhistory = []
+ # ?? does not load if len(self._versionhistory) > revCount
+ # shouldn't it
elif getAll and len(self._versionhistory) == revCount:
# Cause a reload, or at least make the loop run
thisHistoryDone = False
@@ -3907,7 +3910,7 @@
successful = False
for page2 in self.pages:
if page2.sectionFreeTitle() == page.sectionFreeTitle():
- if not (hasattr(page2,'_contents') or
hasattr(page2,'_getexception')) or self.force:
+ if not (hasattr(page2,'_contents') or hasattr(page2,
'_getexception')) or self.force:
page2.editRestriction = entry.editRestriction
page2.moveRestriction = entry.moveRestriction
if editRestriction == 'autoconfirmed':
@@ -3917,6 +3920,7 @@
page2._ipedit = ipedit
page2._revisionId = revisionId
page2._editTime = timestamp
+ page2._versionhistory = [(revisionId,
str(Timestamp.fromtimestampformat(timestamp)), username, entry.comment)]
section = page2.section()
# Store the content
page2._contents = text
----------------------------------------------------------------------
Comment By: Daniel Barrett (djbarrett)
Date: 2010-09-15 17:16
Message:
Note: the example did create category "DD" but did not recategorize the
page in the AABBCC category. (There is only one page in the category.)
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3066934&group_…
Bugs item #3066934, was opened at 2010-09-15 11:12
Message generated for change (Comment added) made by djbarrett
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3066934&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: Open
Resolution: None
Priority: 7
Private: No
Submitted By: Daniel Barrett (djbarrett)
Assigned to: xqt (xqt)
Summary: AttributeError: type object 'Timestamp' has no attribute 'st
Initial Comment:
category.py is throwing the error in the Summary. MediaWiki 1.15.4,
$ sudo python category.py move -from:"AABBCC" -to:"DD"
Traceback (most recent call last):
File "/usr/local/pywikipedia/pagegenerators.py", line 1238, in __iter__
for loaded_page in self.preload(somePages):
File "/usr/local/pywikipedia/pagegenerators.py", line 1257, in preload
pywikibot.getall(site, pagesThisSite)
File "/usr/local/pywikipedia/wikipedia.py", line 4208, in getall
_GetAll(site, pages, throttle, force).run()
File "/usr/local/pywikipedia/wikipedia.py", line 3887, in run
xml.sax.parseString(data, handler)
File "/usr/lib64/python2.4/xml/sax/__init__.py", line 49, in parseString
parser.parse(inpsrc)
File "/usr/lib64/python2.4/xml/sax/expatreader.py", line 107, in parse
xmlreader.IncrementalParser.parse(self, source)
File "/usr/lib64/python2.4/xml/sax/xmlreader.py", line 123, in parse
self.feed(buffer)
File "/usr/lib64/python2.4/xml/sax/expatreader.py", line 207, in feed
self._parser.Parse(data, isFinal)
File "/usr/lib64/python2.4/xml/sax/expatreader.py", line 303, in end_element
self._cont_handler.endElement(name)
File "/usr/local/pywikipedia/xmlreader.py", line 202, in endElement
self.callback(entry)
File "/usr/local/pywikipedia/wikipedia.py", line 3923, in oneDone
page2._versionhistory = [(revisionId, str(Timestamp.fromtimestampformat(timestamp)), username, entry.comment)]
File "/usr/local/pywikipedia/pywikibot/__init__.py", line 47, in fromtimestampformat
return cls.strptime(ts, cls.mediawikiTSFormat)
AttributeError: type object 'Timestamp' has no attribute 'strptime'
type object 'Timestamp' has no attribute 'strptime'
Getting [[Category:AABBCC]]...
Getting [[Category:AABBCC]]...
Couldn't delete Category:AABBCC - not empty.
$ python version.py
Pywikipedia [http] trunk/pywikipedia (r8562, 2010/09/15, 12:54:46)
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
----------------------------------------------------------------------
>Comment By: Daniel Barrett (djbarrett)
Date: 2010-09-15 13:46
Message:
One more:
>>> wp.Timestamp.fromtimestampformat(t)
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/local/pywikipedia/pywikibot/__init__.py", line 47, in
fromtimestampformat
return cls.strptime(ts, cls.mediawikiTSFormat)
AttributeError: type object 'Timestamp' has no attribute 'strptime'
----------------------------------------------------------------------
Comment By: Daniel Barrett (djbarrett)
Date: 2010-09-15 13:45
Message:
OK trying again:
import time
import wikipedia as wp
t = time.strftime("%Y%m%d%H%M%S",time.gmtime())
t
Produces:
'20100915174350'
Then:
wp.Timestamp
still produces:
<class 'pywikibot.Timestamp'>
----------------------------------------------------------------------
Comment By: Daniel Barrett (djbarrett)
Date: 2010-09-15 13:42
Message:
I don't know Python, so I am just repeating what you wrote. First I did:
$ python
Python 2.4.3 (#1, Sep 3 2009, 15:37:37)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-46)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
Then I did:
import wikipedia as wp
t = time.strftime("%Y%m%d%H%M%S",time.gmtime())
Produces:
Traceback (most recent call last):
File "<stdin>", line 1, in ?
NameError: name 'time' is not defined
wp.Timestamp.
Produces:
<class 'pywikibot.Timestamp'>
Then I did:
import sys
sys.path
Produces:
['', '/usr/lib64/python24.zip', '/usr/lib64/python2.4',
'/usr/lib64/python2.4/plat-linux2', '/usr/lib64/python2.4/lib-tk',
'/usr/lib64/python2.4/lib-dynload', '/usr/lib64/python2.4/site-packages',
'/usr/lib64/python2.4/site-packages/gtk-2.0',
'/usr/lib/python2.4/site-packages',
'/usr/local/pywikipedia/userinterfaces',
'/usr/local/pywikipedia/families']
----------------------------------------------------------------------
Comment By: xqt (xqt)
Date: 2010-09-15 13:34
Message:
I haven't found this error. Could you verify some things via idle:
import wikipedia as wp
t = time.strftime("%Y%m%d%H%M%S",time.gmtime())
t
this should print sth like
'20100915172517'
wp.Timestamp.
Please hold this dot and you'll see availlable methods
wp.Timestamp.fromtimestampformat(t)
produces
Timestamp(2010, 9, 15, 17, 31, 53)
str(wp.Timestamp.fromtimestampformat(t))
produces
'2010-09-15T17:31:53Z'
Please also give me your sys.path()
----------------------------------------------------------------------
Comment By: Daniel Barrett (djbarrett)
Date: 2010-09-15 11:22
Message:
The bug was introduced in revision 8562:
svn diff -c8562
Index: wikipedia.py
===================================================================
--- wikipedia.py (revision 8561)
+++ wikipedia.py (revision 8562)
@@ -2559,8 +2559,11 @@
dataQuery = self._versionhistoryearliest
else:
thisHistoryDone = True
- elif not hasattr(self, '_versionhistory') or forceReload:
+ elif not hasattr(self, '_versionhistory') or forceReload or \
+ len(self._versionhistory) < revCount:
self._versionhistory = []
+ # ?? does not load if len(self._versionhistory) > revCount
+ # shouldn't it
elif getAll and len(self._versionhistory) == revCount:
# Cause a reload, or at least make the loop run
thisHistoryDone = False
@@ -3907,7 +3910,7 @@
successful = False
for page2 in self.pages:
if page2.sectionFreeTitle() == page.sectionFreeTitle():
- if not (hasattr(page2,'_contents') or
hasattr(page2,'_getexception')) or self.force:
+ if not (hasattr(page2,'_contents') or hasattr(page2,
'_getexception')) or self.force:
page2.editRestriction = entry.editRestriction
page2.moveRestriction = entry.moveRestriction
if editRestriction == 'autoconfirmed':
@@ -3917,6 +3920,7 @@
page2._ipedit = ipedit
page2._revisionId = revisionId
page2._editTime = timestamp
+ page2._versionhistory = [(revisionId,
str(Timestamp.fromtimestampformat(timestamp)), username, entry.comment)]
section = page2.section()
# Store the content
page2._contents = text
----------------------------------------------------------------------
Comment By: Daniel Barrett (djbarrett)
Date: 2010-09-15 11:16
Message:
Note: the example did create category "DD" but did not recategorize the
page in the AABBCC category. (There is only one page in the category.)
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3066934&group_…
Bugs item #3066934, was opened at 2010-09-15 11:12
Message generated for change (Comment added) made by djbarrett
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3066934&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: Open
Resolution: None
Priority: 7
Private: No
Submitted By: Daniel Barrett (djbarrett)
Assigned to: xqt (xqt)
Summary: AttributeError: type object 'Timestamp' has no attribute 'st
Initial Comment:
category.py is throwing the error in the Summary. MediaWiki 1.15.4,
$ sudo python category.py move -from:"AABBCC" -to:"DD"
Traceback (most recent call last):
File "/usr/local/pywikipedia/pagegenerators.py", line 1238, in __iter__
for loaded_page in self.preload(somePages):
File "/usr/local/pywikipedia/pagegenerators.py", line 1257, in preload
pywikibot.getall(site, pagesThisSite)
File "/usr/local/pywikipedia/wikipedia.py", line 4208, in getall
_GetAll(site, pages, throttle, force).run()
File "/usr/local/pywikipedia/wikipedia.py", line 3887, in run
xml.sax.parseString(data, handler)
File "/usr/lib64/python2.4/xml/sax/__init__.py", line 49, in parseString
parser.parse(inpsrc)
File "/usr/lib64/python2.4/xml/sax/expatreader.py", line 107, in parse
xmlreader.IncrementalParser.parse(self, source)
File "/usr/lib64/python2.4/xml/sax/xmlreader.py", line 123, in parse
self.feed(buffer)
File "/usr/lib64/python2.4/xml/sax/expatreader.py", line 207, in feed
self._parser.Parse(data, isFinal)
File "/usr/lib64/python2.4/xml/sax/expatreader.py", line 303, in end_element
self._cont_handler.endElement(name)
File "/usr/local/pywikipedia/xmlreader.py", line 202, in endElement
self.callback(entry)
File "/usr/local/pywikipedia/wikipedia.py", line 3923, in oneDone
page2._versionhistory = [(revisionId, str(Timestamp.fromtimestampformat(timestamp)), username, entry.comment)]
File "/usr/local/pywikipedia/pywikibot/__init__.py", line 47, in fromtimestampformat
return cls.strptime(ts, cls.mediawikiTSFormat)
AttributeError: type object 'Timestamp' has no attribute 'strptime'
type object 'Timestamp' has no attribute 'strptime'
Getting [[Category:AABBCC]]...
Getting [[Category:AABBCC]]...
Couldn't delete Category:AABBCC - not empty.
$ python version.py
Pywikipedia [http] trunk/pywikipedia (r8562, 2010/09/15, 12:54:46)
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
----------------------------------------------------------------------
>Comment By: Daniel Barrett (djbarrett)
Date: 2010-09-15 13:45
Message:
OK trying again:
import time
import wikipedia as wp
t = time.strftime("%Y%m%d%H%M%S",time.gmtime())
t
Produces:
'20100915174350'
Then:
wp.Timestamp
still produces:
<class 'pywikibot.Timestamp'>
----------------------------------------------------------------------
Comment By: Daniel Barrett (djbarrett)
Date: 2010-09-15 13:42
Message:
I don't know Python, so I am just repeating what you wrote. First I did:
$ python
Python 2.4.3 (#1, Sep 3 2009, 15:37:37)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-46)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
Then I did:
import wikipedia as wp
t = time.strftime("%Y%m%d%H%M%S",time.gmtime())
Produces:
Traceback (most recent call last):
File "<stdin>", line 1, in ?
NameError: name 'time' is not defined
wp.Timestamp.
Produces:
<class 'pywikibot.Timestamp'>
Then I did:
import sys
sys.path
Produces:
['', '/usr/lib64/python24.zip', '/usr/lib64/python2.4',
'/usr/lib64/python2.4/plat-linux2', '/usr/lib64/python2.4/lib-tk',
'/usr/lib64/python2.4/lib-dynload', '/usr/lib64/python2.4/site-packages',
'/usr/lib64/python2.4/site-packages/gtk-2.0',
'/usr/lib/python2.4/site-packages',
'/usr/local/pywikipedia/userinterfaces',
'/usr/local/pywikipedia/families']
----------------------------------------------------------------------
Comment By: xqt (xqt)
Date: 2010-09-15 13:34
Message:
I haven't found this error. Could you verify some things via idle:
import wikipedia as wp
t = time.strftime("%Y%m%d%H%M%S",time.gmtime())
t
this should print sth like
'20100915172517'
wp.Timestamp.
Please hold this dot and you'll see availlable methods
wp.Timestamp.fromtimestampformat(t)
produces
Timestamp(2010, 9, 15, 17, 31, 53)
str(wp.Timestamp.fromtimestampformat(t))
produces
'2010-09-15T17:31:53Z'
Please also give me your sys.path()
----------------------------------------------------------------------
Comment By: Daniel Barrett (djbarrett)
Date: 2010-09-15 11:22
Message:
The bug was introduced in revision 8562:
svn diff -c8562
Index: wikipedia.py
===================================================================
--- wikipedia.py (revision 8561)
+++ wikipedia.py (revision 8562)
@@ -2559,8 +2559,11 @@
dataQuery = self._versionhistoryearliest
else:
thisHistoryDone = True
- elif not hasattr(self, '_versionhistory') or forceReload:
+ elif not hasattr(self, '_versionhistory') or forceReload or \
+ len(self._versionhistory) < revCount:
self._versionhistory = []
+ # ?? does not load if len(self._versionhistory) > revCount
+ # shouldn't it
elif getAll and len(self._versionhistory) == revCount:
# Cause a reload, or at least make the loop run
thisHistoryDone = False
@@ -3907,7 +3910,7 @@
successful = False
for page2 in self.pages:
if page2.sectionFreeTitle() == page.sectionFreeTitle():
- if not (hasattr(page2,'_contents') or
hasattr(page2,'_getexception')) or self.force:
+ if not (hasattr(page2,'_contents') or hasattr(page2,
'_getexception')) or self.force:
page2.editRestriction = entry.editRestriction
page2.moveRestriction = entry.moveRestriction
if editRestriction == 'autoconfirmed':
@@ -3917,6 +3920,7 @@
page2._ipedit = ipedit
page2._revisionId = revisionId
page2._editTime = timestamp
+ page2._versionhistory = [(revisionId,
str(Timestamp.fromtimestampformat(timestamp)), username, entry.comment)]
section = page2.section()
# Store the content
page2._contents = text
----------------------------------------------------------------------
Comment By: Daniel Barrett (djbarrett)
Date: 2010-09-15 11:16
Message:
Note: the example did create category "DD" but did not recategorize the
page in the AABBCC category. (There is only one page in the category.)
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3066934&group_…
Bugs item #3066765, was opened at 2010-09-15 13:02
Message generated for change (Settings changed) made by xqt
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3066765&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: Pending
>Resolution: Works For Me
Priority: 5
Private: No
Submitted By: Dmitry Nikitin (dmitrynikitin)
Assigned to: xqt (xqt)
Summary: clean_sandbox.py: TypeError: 'int' object is unsubscriptable
Initial Comment:
>>python clean_sandbox.py
Traceback (most recent call last):
File "clean_sandbox.py", line 212, in <module>
main()
File "clean_sandbox.py", line 206, in main
bot.run()
File "clean_sandbox.py", line 170, in run
diff = minutesDiff(sandboxPage.editTime(), time.strftime("%Y%m%d%H%M%S", time.gmtime()))
File "clean_sandbox.py", line 138, in minutesDiff
t1 = (((int(time1[0:4]) * 12 + int(time1[4:6])) * 30 +
TypeError: 'int' object is unsubscriptable
-------------------------------------------------------
Pywikipedia [http] trunk/pywikipedia (r8560, 2010/09/15, 10:11:05)
Python 2.6.5 (r265:79063, Apr 16 2010, 13:57:41)
[GCC 4.4.3]
config-settings:
use_api = True
use_api_login = True
----------------------------------------------------------------------
>Comment By: xqt (xqt)
Date: 2010-09-15 19:44
Message:
hm, there is nothing left to do and the editTime() has gone. Please come
back if this bug occures again
----------------------------------------------------------------------
Comment By: Dmitry Nikitin (dmitrynikitin)
Date: 2010-09-15 19:32
Message:
>>python clean_sandbox.py -verbose -lang:ru
Pywikipediabot [http] trunk/pywikipedia (r8564, 2010/09/15, 17:16:53)
Python 2.6.5 (r265:79063, Apr 16 2010, 13:57:41)
[GCC 4.4.3]
Sleeping for 1.0 seconds, 2010-09-15 21:31:10
==== API action:query ====
inprop: protection|talkid|subjectid|url|readable
rvprop: content|ids|flags|timestamp|user|comment|size
prop: revisions|info
titles: Википедия:Песочница
rvlimit: 1
----------------
Requesting API query from wikipedia:ru
getting huge siprop magicwords...
==== API action:query ====
meta: siteinfo
siprop: magicwords
----------------
Requesting API query from wikipedia:ru
The sandbox is still clean, no change necessary.
Done.
----------------------------------------------------------------------
Comment By: xqt (xqt)
Date: 2010-09-15 19:18
Message:
It seem sandboxPage.editTime() is not valid. Please try 8564 and tell me
the -verbose result (and your sandbox you are working on)
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3066765&group_…
Bugs item #3066934, was opened at 2010-09-15 11:12
Message generated for change (Comment added) made by djbarrett
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3066934&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: Open
Resolution: None
Priority: 7
Private: No
Submitted By: Daniel Barrett (djbarrett)
Assigned to: xqt (xqt)
Summary: AttributeError: type object 'Timestamp' has no attribute 'st
Initial Comment:
category.py is throwing the error in the Summary. MediaWiki 1.15.4,
$ sudo python category.py move -from:"AABBCC" -to:"DD"
Traceback (most recent call last):
File "/usr/local/pywikipedia/pagegenerators.py", line 1238, in __iter__
for loaded_page in self.preload(somePages):
File "/usr/local/pywikipedia/pagegenerators.py", line 1257, in preload
pywikibot.getall(site, pagesThisSite)
File "/usr/local/pywikipedia/wikipedia.py", line 4208, in getall
_GetAll(site, pages, throttle, force).run()
File "/usr/local/pywikipedia/wikipedia.py", line 3887, in run
xml.sax.parseString(data, handler)
File "/usr/lib64/python2.4/xml/sax/__init__.py", line 49, in parseString
parser.parse(inpsrc)
File "/usr/lib64/python2.4/xml/sax/expatreader.py", line 107, in parse
xmlreader.IncrementalParser.parse(self, source)
File "/usr/lib64/python2.4/xml/sax/xmlreader.py", line 123, in parse
self.feed(buffer)
File "/usr/lib64/python2.4/xml/sax/expatreader.py", line 207, in feed
self._parser.Parse(data, isFinal)
File "/usr/lib64/python2.4/xml/sax/expatreader.py", line 303, in end_element
self._cont_handler.endElement(name)
File "/usr/local/pywikipedia/xmlreader.py", line 202, in endElement
self.callback(entry)
File "/usr/local/pywikipedia/wikipedia.py", line 3923, in oneDone
page2._versionhistory = [(revisionId, str(Timestamp.fromtimestampformat(timestamp)), username, entry.comment)]
File "/usr/local/pywikipedia/pywikibot/__init__.py", line 47, in fromtimestampformat
return cls.strptime(ts, cls.mediawikiTSFormat)
AttributeError: type object 'Timestamp' has no attribute 'strptime'
type object 'Timestamp' has no attribute 'strptime'
Getting [[Category:AABBCC]]...
Getting [[Category:AABBCC]]...
Couldn't delete Category:AABBCC - not empty.
$ python version.py
Pywikipedia [http] trunk/pywikipedia (r8562, 2010/09/15, 12:54:46)
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
----------------------------------------------------------------------
>Comment By: Daniel Barrett (djbarrett)
Date: 2010-09-15 13:42
Message:
I don't know Python, so I am just repeating what you wrote. First I did:
$ python
Python 2.4.3 (#1, Sep 3 2009, 15:37:37)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-46)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
Then I did:
import wikipedia as wp
t = time.strftime("%Y%m%d%H%M%S",time.gmtime())
Produces:
Traceback (most recent call last):
File "<stdin>", line 1, in ?
NameError: name 'time' is not defined
wp.Timestamp.
Produces:
<class 'pywikibot.Timestamp'>
Then I did:
import sys
sys.path
Produces:
['', '/usr/lib64/python24.zip', '/usr/lib64/python2.4',
'/usr/lib64/python2.4/plat-linux2', '/usr/lib64/python2.4/lib-tk',
'/usr/lib64/python2.4/lib-dynload', '/usr/lib64/python2.4/site-packages',
'/usr/lib64/python2.4/site-packages/gtk-2.0',
'/usr/lib/python2.4/site-packages',
'/usr/local/pywikipedia/userinterfaces',
'/usr/local/pywikipedia/families']
----------------------------------------------------------------------
Comment By: xqt (xqt)
Date: 2010-09-15 13:34
Message:
I haven't found this error. Could you verify some things via idle:
import wikipedia as wp
t = time.strftime("%Y%m%d%H%M%S",time.gmtime())
t
this should print sth like
'20100915172517'
wp.Timestamp.
Please hold this dot and you'll see availlable methods
wp.Timestamp.fromtimestampformat(t)
produces
Timestamp(2010, 9, 15, 17, 31, 53)
str(wp.Timestamp.fromtimestampformat(t))
produces
'2010-09-15T17:31:53Z'
Please also give me your sys.path()
----------------------------------------------------------------------
Comment By: Daniel Barrett (djbarrett)
Date: 2010-09-15 11:22
Message:
The bug was introduced in revision 8562:
svn diff -c8562
Index: wikipedia.py
===================================================================
--- wikipedia.py (revision 8561)
+++ wikipedia.py (revision 8562)
@@ -2559,8 +2559,11 @@
dataQuery = self._versionhistoryearliest
else:
thisHistoryDone = True
- elif not hasattr(self, '_versionhistory') or forceReload:
+ elif not hasattr(self, '_versionhistory') or forceReload or \
+ len(self._versionhistory) < revCount:
self._versionhistory = []
+ # ?? does not load if len(self._versionhistory) > revCount
+ # shouldn't it
elif getAll and len(self._versionhistory) == revCount:
# Cause a reload, or at least make the loop run
thisHistoryDone = False
@@ -3907,7 +3910,7 @@
successful = False
for page2 in self.pages:
if page2.sectionFreeTitle() == page.sectionFreeTitle():
- if not (hasattr(page2,'_contents') or
hasattr(page2,'_getexception')) or self.force:
+ if not (hasattr(page2,'_contents') or hasattr(page2,
'_getexception')) or self.force:
page2.editRestriction = entry.editRestriction
page2.moveRestriction = entry.moveRestriction
if editRestriction == 'autoconfirmed':
@@ -3917,6 +3920,7 @@
page2._ipedit = ipedit
page2._revisionId = revisionId
page2._editTime = timestamp
+ page2._versionhistory = [(revisionId,
str(Timestamp.fromtimestampformat(timestamp)), username, entry.comment)]
section = page2.section()
# Store the content
page2._contents = text
----------------------------------------------------------------------
Comment By: Daniel Barrett (djbarrett)
Date: 2010-09-15 11:16
Message:
Note: the example did create category "DD" but did not recategorize the
page in the AABBCC category. (There is only one page in the category.)
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3066934&group_…
Bugs item #3066934, was opened at 2010-09-15 17:12
Message generated for change (Comment added) made by xqt
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3066934&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: Pending
Resolution: None
Priority: 7
Private: No
Submitted By: Daniel Barrett (djbarrett)
>Assigned to: xqt (xqt)
Summary: AttributeError: type object 'Timestamp' has no attribute 'st
Initial Comment:
category.py is throwing the error in the Summary. MediaWiki 1.15.4,
$ sudo python category.py move -from:"AABBCC" -to:"DD"
Traceback (most recent call last):
File "/usr/local/pywikipedia/pagegenerators.py", line 1238, in __iter__
for loaded_page in self.preload(somePages):
File "/usr/local/pywikipedia/pagegenerators.py", line 1257, in preload
pywikibot.getall(site, pagesThisSite)
File "/usr/local/pywikipedia/wikipedia.py", line 4208, in getall
_GetAll(site, pages, throttle, force).run()
File "/usr/local/pywikipedia/wikipedia.py", line 3887, in run
xml.sax.parseString(data, handler)
File "/usr/lib64/python2.4/xml/sax/__init__.py", line 49, in parseString
parser.parse(inpsrc)
File "/usr/lib64/python2.4/xml/sax/expatreader.py", line 107, in parse
xmlreader.IncrementalParser.parse(self, source)
File "/usr/lib64/python2.4/xml/sax/xmlreader.py", line 123, in parse
self.feed(buffer)
File "/usr/lib64/python2.4/xml/sax/expatreader.py", line 207, in feed
self._parser.Parse(data, isFinal)
File "/usr/lib64/python2.4/xml/sax/expatreader.py", line 303, in end_element
self._cont_handler.endElement(name)
File "/usr/local/pywikipedia/xmlreader.py", line 202, in endElement
self.callback(entry)
File "/usr/local/pywikipedia/wikipedia.py", line 3923, in oneDone
page2._versionhistory = [(revisionId, str(Timestamp.fromtimestampformat(timestamp)), username, entry.comment)]
File "/usr/local/pywikipedia/pywikibot/__init__.py", line 47, in fromtimestampformat
return cls.strptime(ts, cls.mediawikiTSFormat)
AttributeError: type object 'Timestamp' has no attribute 'strptime'
type object 'Timestamp' has no attribute 'strptime'
Getting [[Category:AABBCC]]...
Getting [[Category:AABBCC]]...
Couldn't delete Category:AABBCC - not empty.
$ python version.py
Pywikipedia [http] trunk/pywikipedia (r8562, 2010/09/15, 12:54:46)
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
----------------------------------------------------------------------
>Comment By: xqt (xqt)
Date: 2010-09-15 19:34
Message:
I haven't found this error. Could you verify some things via idle:
import wikipedia as wp
t = time.strftime("%Y%m%d%H%M%S",time.gmtime())
t
this should print sth like
'20100915172517'
wp.Timestamp.
Please hold this dot and you'll see availlable methods
wp.Timestamp.fromtimestampformat(t)
produces
Timestamp(2010, 9, 15, 17, 31, 53)
str(wp.Timestamp.fromtimestampformat(t))
produces
'2010-09-15T17:31:53Z'
Please also give me your sys.path()
----------------------------------------------------------------------
Comment By: Daniel Barrett (djbarrett)
Date: 2010-09-15 17:22
Message:
The bug was introduced in revision 8562:
svn diff -c8562
Index: wikipedia.py
===================================================================
--- wikipedia.py (revision 8561)
+++ wikipedia.py (revision 8562)
@@ -2559,8 +2559,11 @@
dataQuery = self._versionhistoryearliest
else:
thisHistoryDone = True
- elif not hasattr(self, '_versionhistory') or forceReload:
+ elif not hasattr(self, '_versionhistory') or forceReload or \
+ len(self._versionhistory) < revCount:
self._versionhistory = []
+ # ?? does not load if len(self._versionhistory) > revCount
+ # shouldn't it
elif getAll and len(self._versionhistory) == revCount:
# Cause a reload, or at least make the loop run
thisHistoryDone = False
@@ -3907,7 +3910,7 @@
successful = False
for page2 in self.pages:
if page2.sectionFreeTitle() == page.sectionFreeTitle():
- if not (hasattr(page2,'_contents') or
hasattr(page2,'_getexception')) or self.force:
+ if not (hasattr(page2,'_contents') or hasattr(page2,
'_getexception')) or self.force:
page2.editRestriction = entry.editRestriction
page2.moveRestriction = entry.moveRestriction
if editRestriction == 'autoconfirmed':
@@ -3917,6 +3920,7 @@
page2._ipedit = ipedit
page2._revisionId = revisionId
page2._editTime = timestamp
+ page2._versionhistory = [(revisionId,
str(Timestamp.fromtimestampformat(timestamp)), username, entry.comment)]
section = page2.section()
# Store the content
page2._contents = text
----------------------------------------------------------------------
Comment By: Daniel Barrett (djbarrett)
Date: 2010-09-15 17:16
Message:
Note: the example did create category "DD" but did not recategorize the
page in the AABBCC category. (There is only one page in the category.)
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3066934&group_…
Bugs item #3066765, was opened at 2010-09-15 11:02
Message generated for change (Settings changed) made by dmitrynikitin
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3066765&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: Dmitry Nikitin (dmitrynikitin)
Assigned to: xqt (xqt)
Summary: clean_sandbox.py: TypeError: 'int' object is unsubscriptable
Initial Comment:
>>python clean_sandbox.py
Traceback (most recent call last):
File "clean_sandbox.py", line 212, in <module>
main()
File "clean_sandbox.py", line 206, in main
bot.run()
File "clean_sandbox.py", line 170, in run
diff = minutesDiff(sandboxPage.editTime(), time.strftime("%Y%m%d%H%M%S", time.gmtime()))
File "clean_sandbox.py", line 138, in minutesDiff
t1 = (((int(time1[0:4]) * 12 + int(time1[4:6])) * 30 +
TypeError: 'int' object is unsubscriptable
-------------------------------------------------------
Pywikipedia [http] trunk/pywikipedia (r8560, 2010/09/15, 10:11:05)
Python 2.6.5 (r265:79063, Apr 16 2010, 13:57:41)
[GCC 4.4.3]
config-settings:
use_api = True
use_api_login = True
----------------------------------------------------------------------
>Comment By: Dmitry Nikitin (dmitrynikitin)
Date: 2010-09-15 17:32
Message:
>>python clean_sandbox.py -verbose -lang:ru
Pywikipediabot [http] trunk/pywikipedia (r8564, 2010/09/15, 17:16:53)
Python 2.6.5 (r265:79063, Apr 16 2010, 13:57:41)
[GCC 4.4.3]
Sleeping for 1.0 seconds, 2010-09-15 21:31:10
==== API action:query ====
inprop: protection|talkid|subjectid|url|readable
rvprop: content|ids|flags|timestamp|user|comment|size
prop: revisions|info
titles: Википедия:Песочница
rvlimit: 1
----------------
Requesting API query from wikipedia:ru
getting huge siprop magicwords...
==== API action:query ====
meta: siteinfo
siprop: magicwords
----------------
Requesting API query from wikipedia:ru
The sandbox is still clean, no change necessary.
Done.
----------------------------------------------------------------------
Comment By: xqt (xqt)
Date: 2010-09-15 17:18
Message:
It seem sandboxPage.editTime() is not valid. Please try 8564 and tell me
the -verbose result (and your sandbox you are working on)
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3066765&group_…
Bugs item #3066765, was opened at 2010-09-15 13:02
Message generated for change (Comment added) made by xqt
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3066765&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: Pending
Resolution: None
Priority: 5
Private: No
Submitted By: Dmitry Nikitin (dmitrynikitin)
>Assigned to: xqt (xqt)
Summary: clean_sandbox.py: TypeError: 'int' object is unsubscriptable
Initial Comment:
>>python clean_sandbox.py
Traceback (most recent call last):
File "clean_sandbox.py", line 212, in <module>
main()
File "clean_sandbox.py", line 206, in main
bot.run()
File "clean_sandbox.py", line 170, in run
diff = minutesDiff(sandboxPage.editTime(), time.strftime("%Y%m%d%H%M%S", time.gmtime()))
File "clean_sandbox.py", line 138, in minutesDiff
t1 = (((int(time1[0:4]) * 12 + int(time1[4:6])) * 30 +
TypeError: 'int' object is unsubscriptable
-------------------------------------------------------
Pywikipedia [http] trunk/pywikipedia (r8560, 2010/09/15, 10:11:05)
Python 2.6.5 (r265:79063, Apr 16 2010, 13:57:41)
[GCC 4.4.3]
config-settings:
use_api = True
use_api_login = True
----------------------------------------------------------------------
>Comment By: xqt (xqt)
Date: 2010-09-15 19:18
Message:
It seem sandboxPage.editTime() is not valid. Please try 8564 and tell me
the -verbose result (and your sandbox you are working on)
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3066765&group_…
Bugs item #2968140, was opened at 2010-03-10 20:48
Message generated for change (Comment added) made by ganz-ru
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2968140&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: JAn (jandudik)
Assigned to: Nobody/Anonymous (nobody)
Summary: unrecognized dismbiguation templates
Initial Comment:
In http://en.wikipedia.org/wiki/MediaWiki:Disambiguationspage there are some templates which are not as links. bot cannot recognize it and removes links to some disambiguations with templates like {{shiplist}} or {{surname}}.
But these articles are in some languages as disambigs, in some not. Maybe do something for recognize these as semi-disambiguations?
----------------------------------------------------------------------
Comment By: GanZ (ganz-ru)
Date: 2010-09-15 20:19
Message:
I join to the request of JAn. In en.wiki there is a special type of
disambigiations - {{SIA}}. When Script work automatically it concerns pages
with {{SIA}} as non-disambig and can remove correct interwikis.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2968140&group_…
Bugs item #3053539, was opened at 2010-08-26 10:05
Message generated for change (Comment added) made by djbarrett
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3053539&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: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Daniel Barrett (djbarrett)
Assigned to: Nobody/Anonymous (nobody)
Summary: category.py move ignores noinclude, includeonly
Initial Comment:
When running "python category.py move", if the old category is enclosed in <noinclude> or <includeonly> tags, the new, replaced category is not, which is a problem. For example, this construction:
<includeonly>[[Category:Foo]]</includeonly>
when operated on by:
python category.py move -from:"Foo" -to:"Bar"
produces:
<includeonly></includeonly>
[[Category:Bar]]
which is wrong.
This bug has existed for a long time, at least a few years.
$ python version.py
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
$ svn info
Revision: 8319
----------------------------------------------------------------------
>Comment By: Daniel Barrett (djbarrett)
Date: 2010-09-15 11:33
Message:
Note: bug 3066934 may block you from testing this. r8562 introduced a
fatal bug in category.py.
----------------------------------------------------------------------
Comment By: Daniel Barrett (djbarrett)
Date: 2010-09-15 11:32
Message:
Here is an even worse example. Just like in the previous example, create
"Template:Pywikipedia test", but this time, make its contents:
Hello.<noinclude>[[Category:AABBCC]]</noinclude><includeonly>[[Category:EE]]</includeonly>
Again, make the article "Test" contain:
{{pywikipedia test}}
Now run:
$ python category.py move -from:"AABBCC" -to:"DD"
In this case, "Template:Pywikipedia test" gets modified completely wrong
to become:
Hello.<noinclude></noinclude><includeonly>
</includeonly>
[[Category:DD]]
So the category tag for "EE" vanishes completely, and "DD" gets moved
outside of the "noinclude" tags.
Piwikipedia's output for this command was:
$ python category.py move -from:"AABBCC" -to:"DD"
Target page Category:DD already exists!
Getting [[Category:AABBCC]]...
Getting 1 pages from vistawiki:en...
Sleeping for 5.8 seconds, 2010-09-15 11:28:53
Updating page [[Template:Pywikipedia test]] via API
Getting [[Category:AABBCC]]...
----------------------------------------------------------------------
Comment By: Daniel Barrett (djbarrett)
Date: 2010-09-15 11:29
Message:
Yes, it's related to templates. Here is a test case.
1. Create "Template:Pywikipedia test" containing:
Hello.<includeonly>[[Category:AABBCC]]</includeonly>
2. Create an article "test" containing:
{{pywikipedia test}}
3. Run:
$ python category.py move -from:"AABBCC" -to:"DD"
The output shows that Pywikipedia gets confused and can't modify the
category tag inside the template:
Target page Category:DD already exists!
Getting [[Category:AABBCC]]...
Getting 1 pages from vistawiki:en...
ERROR: [[Test]] is not in category Category:AABBCC!
Getting [[Category:AABBCC]]...
----------------------------------------------------------------------
Comment By: xqt (xqt)
Date: 2010-09-15 06:19
Message:
Is this related to templates? Could you give me a sample.
----------------------------------------------------------------------
Comment By: Daniel Barrett (djbarrett)
Date: 2010-09-13 15:58
Message:
This bug is destructive to wiki articles. Any chance it will be addressed
soon? Thanks.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3053539&group_…
Bugs item #3053539, was opened at 2010-08-26 10:05
Message generated for change (Comment added) made by djbarrett
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3053539&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: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Daniel Barrett (djbarrett)
Assigned to: Nobody/Anonymous (nobody)
Summary: category.py move ignores noinclude, includeonly
Initial Comment:
When running "python category.py move", if the old category is enclosed in <noinclude> or <includeonly> tags, the new, replaced category is not, which is a problem. For example, this construction:
<includeonly>[[Category:Foo]]</includeonly>
when operated on by:
python category.py move -from:"Foo" -to:"Bar"
produces:
<includeonly></includeonly>
[[Category:Bar]]
which is wrong.
This bug has existed for a long time, at least a few years.
$ python version.py
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
$ svn info
Revision: 8319
----------------------------------------------------------------------
>Comment By: Daniel Barrett (djbarrett)
Date: 2010-09-15 11:32
Message:
Here is an even worse example. Just like in the previous example, create
"Template:Pywikipedia test", but this time, make its contents:
Hello.<noinclude>[[Category:AABBCC]]</noinclude><includeonly>[[Category:EE]]</includeonly>
Again, make the article "Test" contain:
{{pywikipedia test}}
Now run:
$ python category.py move -from:"AABBCC" -to:"DD"
In this case, "Template:Pywikipedia test" gets modified completely wrong
to become:
Hello.<noinclude></noinclude><includeonly>
</includeonly>
[[Category:DD]]
So the category tag for "EE" vanishes completely, and "DD" gets moved
outside of the "noinclude" tags.
Piwikipedia's output for this command was:
$ python category.py move -from:"AABBCC" -to:"DD"
Target page Category:DD already exists!
Getting [[Category:AABBCC]]...
Getting 1 pages from vistawiki:en...
Sleeping for 5.8 seconds, 2010-09-15 11:28:53
Updating page [[Template:Pywikipedia test]] via API
Getting [[Category:AABBCC]]...
----------------------------------------------------------------------
Comment By: Daniel Barrett (djbarrett)
Date: 2010-09-15 11:29
Message:
Yes, it's related to templates. Here is a test case.
1. Create "Template:Pywikipedia test" containing:
Hello.<includeonly>[[Category:AABBCC]]</includeonly>
2. Create an article "test" containing:
{{pywikipedia test}}
3. Run:
$ python category.py move -from:"AABBCC" -to:"DD"
The output shows that Pywikipedia gets confused and can't modify the
category tag inside the template:
Target page Category:DD already exists!
Getting [[Category:AABBCC]]...
Getting 1 pages from vistawiki:en...
ERROR: [[Test]] is not in category Category:AABBCC!
Getting [[Category:AABBCC]]...
----------------------------------------------------------------------
Comment By: xqt (xqt)
Date: 2010-09-15 06:19
Message:
Is this related to templates? Could you give me a sample.
----------------------------------------------------------------------
Comment By: Daniel Barrett (djbarrett)
Date: 2010-09-13 15:58
Message:
This bug is destructive to wiki articles. Any chance it will be addressed
soon? Thanks.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3053539&group_…
Bugs item #3053539, was opened at 2010-08-26 10:05
Message generated for change (Comment added) made by djbarrett
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3053539&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: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Daniel Barrett (djbarrett)
Assigned to: Nobody/Anonymous (nobody)
Summary: category.py move ignores noinclude, includeonly
Initial Comment:
When running "python category.py move", if the old category is enclosed in <noinclude> or <includeonly> tags, the new, replaced category is not, which is a problem. For example, this construction:
<includeonly>[[Category:Foo]]</includeonly>
when operated on by:
python category.py move -from:"Foo" -to:"Bar"
produces:
<includeonly></includeonly>
[[Category:Bar]]
which is wrong.
This bug has existed for a long time, at least a few years.
$ python version.py
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
$ svn info
Revision: 8319
----------------------------------------------------------------------
>Comment By: Daniel Barrett (djbarrett)
Date: 2010-09-15 11:29
Message:
Yes, it's related to templates. Here is a test case.
1. Create "Template:Pywikipedia test" containing:
Hello.<includeonly>[[Category:AABBCC]]</includeonly>
2. Create an article "test" containing:
{{pywikipedia test}}
3. Run:
$ python category.py move -from:"AABBCC" -to:"DD"
The output shows that Pywikipedia gets confused and can't modify the
category tag inside the template:
Target page Category:DD already exists!
Getting [[Category:AABBCC]]...
Getting 1 pages from vistawiki:en...
ERROR: [[Test]] is not in category Category:AABBCC!
Getting [[Category:AABBCC]]...
----------------------------------------------------------------------
Comment By: xqt (xqt)
Date: 2010-09-15 06:19
Message:
Is this related to templates? Could you give me a sample.
----------------------------------------------------------------------
Comment By: Daniel Barrett (djbarrett)
Date: 2010-09-13 15:58
Message:
This bug is destructive to wiki articles. Any chance it will be addressed
soon? Thanks.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3053539&group_…
Bugs item #3066934, was opened at 2010-09-15 11:12
Message generated for change (Comment added) made by djbarrett
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3066934&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: Open
Resolution: None
Priority: 7
Private: No
Submitted By: Daniel Barrett (djbarrett)
Assigned to: Nobody/Anonymous (nobody)
Summary: AttributeError: type object 'Timestamp' has no attribute 'st
Initial Comment:
category.py is throwing the error in the Summary. MediaWiki 1.15.4,
$ sudo python category.py move -from:"AABBCC" -to:"DD"
Traceback (most recent call last):
File "/usr/local/pywikipedia/pagegenerators.py", line 1238, in __iter__
for loaded_page in self.preload(somePages):
File "/usr/local/pywikipedia/pagegenerators.py", line 1257, in preload
pywikibot.getall(site, pagesThisSite)
File "/usr/local/pywikipedia/wikipedia.py", line 4208, in getall
_GetAll(site, pages, throttle, force).run()
File "/usr/local/pywikipedia/wikipedia.py", line 3887, in run
xml.sax.parseString(data, handler)
File "/usr/lib64/python2.4/xml/sax/__init__.py", line 49, in parseString
parser.parse(inpsrc)
File "/usr/lib64/python2.4/xml/sax/expatreader.py", line 107, in parse
xmlreader.IncrementalParser.parse(self, source)
File "/usr/lib64/python2.4/xml/sax/xmlreader.py", line 123, in parse
self.feed(buffer)
File "/usr/lib64/python2.4/xml/sax/expatreader.py", line 207, in feed
self._parser.Parse(data, isFinal)
File "/usr/lib64/python2.4/xml/sax/expatreader.py", line 303, in end_element
self._cont_handler.endElement(name)
File "/usr/local/pywikipedia/xmlreader.py", line 202, in endElement
self.callback(entry)
File "/usr/local/pywikipedia/wikipedia.py", line 3923, in oneDone
page2._versionhistory = [(revisionId, str(Timestamp.fromtimestampformat(timestamp)), username, entry.comment)]
File "/usr/local/pywikipedia/pywikibot/__init__.py", line 47, in fromtimestampformat
return cls.strptime(ts, cls.mediawikiTSFormat)
AttributeError: type object 'Timestamp' has no attribute 'strptime'
type object 'Timestamp' has no attribute 'strptime'
Getting [[Category:AABBCC]]...
Getting [[Category:AABBCC]]...
Couldn't delete Category:AABBCC - not empty.
$ python version.py
Pywikipedia [http] trunk/pywikipedia (r8562, 2010/09/15, 12:54:46)
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
----------------------------------------------------------------------
>Comment By: Daniel Barrett (djbarrett)
Date: 2010-09-15 11:22
Message:
The bug was introduced in revision 8562:
svn diff -c8562
Index: wikipedia.py
===================================================================
--- wikipedia.py (revision 8561)
+++ wikipedia.py (revision 8562)
@@ -2559,8 +2559,11 @@
dataQuery = self._versionhistoryearliest
else:
thisHistoryDone = True
- elif not hasattr(self, '_versionhistory') or forceReload:
+ elif not hasattr(self, '_versionhistory') or forceReload or \
+ len(self._versionhistory) < revCount:
self._versionhistory = []
+ # ?? does not load if len(self._versionhistory) > revCount
+ # shouldn't it
elif getAll and len(self._versionhistory) == revCount:
# Cause a reload, or at least make the loop run
thisHistoryDone = False
@@ -3907,7 +3910,7 @@
successful = False
for page2 in self.pages:
if page2.sectionFreeTitle() == page.sectionFreeTitle():
- if not (hasattr(page2,'_contents') or
hasattr(page2,'_getexception')) or self.force:
+ if not (hasattr(page2,'_contents') or hasattr(page2,
'_getexception')) or self.force:
page2.editRestriction = entry.editRestriction
page2.moveRestriction = entry.moveRestriction
if editRestriction == 'autoconfirmed':
@@ -3917,6 +3920,7 @@
page2._ipedit = ipedit
page2._revisionId = revisionId
page2._editTime = timestamp
+ page2._versionhistory = [(revisionId,
str(Timestamp.fromtimestampformat(timestamp)), username, entry.comment)]
section = page2.section()
# Store the content
page2._contents = text
----------------------------------------------------------------------
Comment By: Daniel Barrett (djbarrett)
Date: 2010-09-15 11:16
Message:
Note: the example did create category "DD" but did not recategorize the
page in the AABBCC category. (There is only one page in the category.)
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3066934&group_…
Bugs item #3066934, was opened at 2010-09-15 11:12
Message generated for change (Comment added) made by djbarrett
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3066934&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: Open
Resolution: None
Priority: 7
Private: No
Submitted By: Daniel Barrett (djbarrett)
Assigned to: Nobody/Anonymous (nobody)
Summary: AttributeError: type object 'Timestamp' has no attribute 'st
Initial Comment:
category.py is throwing the error in the Summary. MediaWiki 1.15.4,
$ sudo python category.py move -from:"AABBCC" -to:"DD"
Traceback (most recent call last):
File "/usr/local/pywikipedia/pagegenerators.py", line 1238, in __iter__
for loaded_page in self.preload(somePages):
File "/usr/local/pywikipedia/pagegenerators.py", line 1257, in preload
pywikibot.getall(site, pagesThisSite)
File "/usr/local/pywikipedia/wikipedia.py", line 4208, in getall
_GetAll(site, pages, throttle, force).run()
File "/usr/local/pywikipedia/wikipedia.py", line 3887, in run
xml.sax.parseString(data, handler)
File "/usr/lib64/python2.4/xml/sax/__init__.py", line 49, in parseString
parser.parse(inpsrc)
File "/usr/lib64/python2.4/xml/sax/expatreader.py", line 107, in parse
xmlreader.IncrementalParser.parse(self, source)
File "/usr/lib64/python2.4/xml/sax/xmlreader.py", line 123, in parse
self.feed(buffer)
File "/usr/lib64/python2.4/xml/sax/expatreader.py", line 207, in feed
self._parser.Parse(data, isFinal)
File "/usr/lib64/python2.4/xml/sax/expatreader.py", line 303, in end_element
self._cont_handler.endElement(name)
File "/usr/local/pywikipedia/xmlreader.py", line 202, in endElement
self.callback(entry)
File "/usr/local/pywikipedia/wikipedia.py", line 3923, in oneDone
page2._versionhistory = [(revisionId, str(Timestamp.fromtimestampformat(timestamp)), username, entry.comment)]
File "/usr/local/pywikipedia/pywikibot/__init__.py", line 47, in fromtimestampformat
return cls.strptime(ts, cls.mediawikiTSFormat)
AttributeError: type object 'Timestamp' has no attribute 'strptime'
type object 'Timestamp' has no attribute 'strptime'
Getting [[Category:AABBCC]]...
Getting [[Category:AABBCC]]...
Couldn't delete Category:AABBCC - not empty.
$ python version.py
Pywikipedia [http] trunk/pywikipedia (r8562, 2010/09/15, 12:54:46)
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
----------------------------------------------------------------------
>Comment By: Daniel Barrett (djbarrett)
Date: 2010-09-15 11:16
Message:
Note: the example did create category "DD" but did not recategorize the
page in the AABBCC category. (There is only one page in the category.)
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3066934&group_…
Bugs item #3066934, was opened at 2010-09-15 11:12
Message generated for change (Settings changed) made by djbarrett
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3066934&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: Open
Resolution: None
>Priority: 7
Private: No
Submitted By: Daniel Barrett (djbarrett)
Assigned to: Nobody/Anonymous (nobody)
Summary: AttributeError: type object 'Timestamp' has no attribute 'st
Initial Comment:
category.py is throwing the error in the Summary. MediaWiki 1.15.4,
$ sudo python category.py move -from:"AABBCC" -to:"DD"
Traceback (most recent call last):
File "/usr/local/pywikipedia/pagegenerators.py", line 1238, in __iter__
for loaded_page in self.preload(somePages):
File "/usr/local/pywikipedia/pagegenerators.py", line 1257, in preload
pywikibot.getall(site, pagesThisSite)
File "/usr/local/pywikipedia/wikipedia.py", line 4208, in getall
_GetAll(site, pages, throttle, force).run()
File "/usr/local/pywikipedia/wikipedia.py", line 3887, in run
xml.sax.parseString(data, handler)
File "/usr/lib64/python2.4/xml/sax/__init__.py", line 49, in parseString
parser.parse(inpsrc)
File "/usr/lib64/python2.4/xml/sax/expatreader.py", line 107, in parse
xmlreader.IncrementalParser.parse(self, source)
File "/usr/lib64/python2.4/xml/sax/xmlreader.py", line 123, in parse
self.feed(buffer)
File "/usr/lib64/python2.4/xml/sax/expatreader.py", line 207, in feed
self._parser.Parse(data, isFinal)
File "/usr/lib64/python2.4/xml/sax/expatreader.py", line 303, in end_element
self._cont_handler.endElement(name)
File "/usr/local/pywikipedia/xmlreader.py", line 202, in endElement
self.callback(entry)
File "/usr/local/pywikipedia/wikipedia.py", line 3923, in oneDone
page2._versionhistory = [(revisionId, str(Timestamp.fromtimestampformat(timestamp)), username, entry.comment)]
File "/usr/local/pywikipedia/pywikibot/__init__.py", line 47, in fromtimestampformat
return cls.strptime(ts, cls.mediawikiTSFormat)
AttributeError: type object 'Timestamp' has no attribute 'strptime'
type object 'Timestamp' has no attribute 'strptime'
Getting [[Category:AABBCC]]...
Getting [[Category:AABBCC]]...
Couldn't delete Category:AABBCC - not empty.
$ python version.py
Pywikipedia [http] trunk/pywikipedia (r8562, 2010/09/15, 12:54:46)
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
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3066934&group_…
Bugs item #3066934, was opened at 2010-09-15 11:12
Message generated for change (Tracker Item Submitted) made by djbarrett
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3066934&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: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Daniel Barrett (djbarrett)
Assigned to: Nobody/Anonymous (nobody)
Summary: AttributeError: type object 'Timestamp' has no attribute 'st
Initial Comment:
category.py is throwing the error in the Summary. MediaWiki 1.15.4,
$ sudo python category.py move -from:"AABBCC" -to:"DD"
Traceback (most recent call last):
File "/usr/local/pywikipedia/pagegenerators.py", line 1238, in __iter__
for loaded_page in self.preload(somePages):
File "/usr/local/pywikipedia/pagegenerators.py", line 1257, in preload
pywikibot.getall(site, pagesThisSite)
File "/usr/local/pywikipedia/wikipedia.py", line 4208, in getall
_GetAll(site, pages, throttle, force).run()
File "/usr/local/pywikipedia/wikipedia.py", line 3887, in run
xml.sax.parseString(data, handler)
File "/usr/lib64/python2.4/xml/sax/__init__.py", line 49, in parseString
parser.parse(inpsrc)
File "/usr/lib64/python2.4/xml/sax/expatreader.py", line 107, in parse
xmlreader.IncrementalParser.parse(self, source)
File "/usr/lib64/python2.4/xml/sax/xmlreader.py", line 123, in parse
self.feed(buffer)
File "/usr/lib64/python2.4/xml/sax/expatreader.py", line 207, in feed
self._parser.Parse(data, isFinal)
File "/usr/lib64/python2.4/xml/sax/expatreader.py", line 303, in end_element
self._cont_handler.endElement(name)
File "/usr/local/pywikipedia/xmlreader.py", line 202, in endElement
self.callback(entry)
File "/usr/local/pywikipedia/wikipedia.py", line 3923, in oneDone
page2._versionhistory = [(revisionId, str(Timestamp.fromtimestampformat(timestamp)), username, entry.comment)]
File "/usr/local/pywikipedia/pywikibot/__init__.py", line 47, in fromtimestampformat
return cls.strptime(ts, cls.mediawikiTSFormat)
AttributeError: type object 'Timestamp' has no attribute 'strptime'
type object 'Timestamp' has no attribute 'strptime'
Getting [[Category:AABBCC]]...
Getting [[Category:AABBCC]]...
Couldn't delete Category:AABBCC - not empty.
$ python version.py
Pywikipedia [http] trunk/pywikipedia (r8562, 2010/09/15, 12:54:46)
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
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3066934&group_…
Bugs item #3066765, was opened at 2010-09-15 11:02
Message generated for change (Tracker Item Submitted) made by dmitrynikitin
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3066765&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: Dmitry Nikitin (dmitrynikitin)
Assigned to: Nobody/Anonymous (nobody)
Summary: clean_sandbox.py: TypeError: 'int' object is unsubscriptable
Initial Comment:
>>python clean_sandbox.py
Traceback (most recent call last):
File "clean_sandbox.py", line 212, in <module>
main()
File "clean_sandbox.py", line 206, in main
bot.run()
File "clean_sandbox.py", line 170, in run
diff = minutesDiff(sandboxPage.editTime(), time.strftime("%Y%m%d%H%M%S", time.gmtime()))
File "clean_sandbox.py", line 138, in minutesDiff
t1 = (((int(time1[0:4]) * 12 + int(time1[4:6])) * 30 +
TypeError: 'int' object is unsubscriptable
-------------------------------------------------------
Pywikipedia [http] trunk/pywikipedia (r8560, 2010/09/15, 10:11:05)
Python 2.6.5 (r265:79063, Apr 16 2010, 13:57:41)
[GCC 4.4.3]
config-settings:
use_api = True
use_api_login = True
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3066765&group_…
Bugs item #3053539, was opened at 2010-08-26 16:05
Message generated for change (Comment added) made by xqt
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3053539&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: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Daniel Barrett (djbarrett)
Assigned to: Nobody/Anonymous (nobody)
Summary: category.py move ignores noinclude, includeonly
Initial Comment:
When running "python category.py move", if the old category is enclosed in <noinclude> or <includeonly> tags, the new, replaced category is not, which is a problem. For example, this construction:
<includeonly>[[Category:Foo]]</includeonly>
when operated on by:
python category.py move -from:"Foo" -to:"Bar"
produces:
<includeonly></includeonly>
[[Category:Bar]]
which is wrong.
This bug has existed for a long time, at least a few years.
$ python version.py
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
$ svn info
Revision: 8319
----------------------------------------------------------------------
>Comment By: xqt (xqt)
Date: 2010-09-15 12:19
Message:
Is this related to templates? Could you give me a sample.
----------------------------------------------------------------------
Comment By: Daniel Barrett (djbarrett)
Date: 2010-09-13 21:58
Message:
This bug is destructive to wiki articles. Any chance it will be addressed
soon? Thanks.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3053539&group_…
Support Requests item #3065711, was opened at 2010-09-14 06:14
Message generated for change (Settings changed) made by xqt
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603139&aid=3065711&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: Install Problem
Group: None
>Status: Pending
Priority: 5
Private: No
Submitted By: https://www.google.com/accounts ()
Assigned to: xqt (xqt)
Summary: replace.py appears to be broken with MW 1.15.5 on Ubuntu
Initial Comment:
On Ubuntu 10.04 and 8.04, when I try to run replace.py from the 2010-09-13 version in SVN:
Traceback (most recent call last):
File "/path/to/pywikipedia/pagegenerators.py", line 1225, in __iter__
for page in self.wrapped_gen:
File "/path/to/pywikipedia/pagegenerators.py", line 1157, in DuplicateFilterPageGenerator
for page in generator:
File "path/to/pywikipedia/pagegenerators.py", line 617, in AllpagesPageGenerator
includeredirects=includeredirects):
File "/path/to/pywikipedia/wikipedia.py", line 6431, in allpages
for p in data['query']['allpages']:
KeyError: 'query'
'query'
Replace.py works on an identical installation on a Mac using the same versions of Apache, PHP, and MySQL. This problem showed up when I upgraded to MW 1.15.5 from 1.15.4 on Ubuntu - no problems whatsoever on the Mac after the upgrade.
I would prefer to go to 1.16, but I am using an extension (SMWHalo) that does not yet work with that version.
Any ideas? The problem arises no matter what I put in the command line, but works just fine on the Mac. I can edit locally and upload to the Ubuntu installations, but this is not a viable long-term solution.
Unfortunately, I don't have the time to learn Python to try to identify the error - but I do know that it pywikipediabot shouldn't completely break every time there is a minor upgrade to MediaWiki. It's great when it works, but when it doesn't, I find myself wishing for less fragile solution.
----------------------------------------------------------------------
Comment By: xqt (xqt)
Date: 2010-09-15 12:16
Message:
btw. allpages() hasn't changed since r8350
http://svn.wikimedia.org/viewvc/pywikipedia/trunk/pywikipedia/wikipedia.py?…
----------------------------------------------------------------------
Comment By: xqt (xqt)
Date: 2010-09-15 12:14
Message:
Try r8560 and check it with -verbose. It looks like an API error since
'query' is not in data object.
Maybe there is something wrong with json module? You have different Python
versions.
----------------------------------------------------------------------
Comment By: https://www.google.com/accounts ()
Date: 2010-09-14 06:31
Message:
Update: On further investigation, it looks like there was some sort of
change introduced in pywikipediabot, NOT mediawiki.
Version string on the Mac:
Pywikipedia nightly:pywikipedia (r8350, 2010/07/09, 08:02:52)
Python 2.6.1 (r261:67515, Feb 11 2010, 00:51:29)
[GCC 4.2.1 (Apple Inc. build 5646)]
config-settings:
use_api = True
use_api_login = True
On one of the Ubuntu boxes:
Pywikipedia [http] trunk/pywikipedia (r8551, 2010/09/13, 15:49:35)
Python 2.5.2 (r252:60911, Jan 20 2010, 21:48:48)
[GCC 4.2.4 (Ubuntu 4.2.4-1ubuntu3)]
config-settings:
use_api = True
use_api_login = True
Any ideas?
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603139&aid=3065711&group_…
Support Requests item #3065711, was opened at 2010-09-14 06:14
Message generated for change (Comment added) made by xqt
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603139&aid=3065711&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: Install Problem
Group: None
Status: Open
Priority: 5
Private: No
Submitted By: https://www.google.com/accounts ()
Assigned to: xqt (xqt)
Summary: replace.py appears to be broken with MW 1.15.5 on Ubuntu
Initial Comment:
On Ubuntu 10.04 and 8.04, when I try to run replace.py from the 2010-09-13 version in SVN:
Traceback (most recent call last):
File "/path/to/pywikipedia/pagegenerators.py", line 1225, in __iter__
for page in self.wrapped_gen:
File "/path/to/pywikipedia/pagegenerators.py", line 1157, in DuplicateFilterPageGenerator
for page in generator:
File "path/to/pywikipedia/pagegenerators.py", line 617, in AllpagesPageGenerator
includeredirects=includeredirects):
File "/path/to/pywikipedia/wikipedia.py", line 6431, in allpages
for p in data['query']['allpages']:
KeyError: 'query'
'query'
Replace.py works on an identical installation on a Mac using the same versions of Apache, PHP, and MySQL. This problem showed up when I upgraded to MW 1.15.5 from 1.15.4 on Ubuntu - no problems whatsoever on the Mac after the upgrade.
I would prefer to go to 1.16, but I am using an extension (SMWHalo) that does not yet work with that version.
Any ideas? The problem arises no matter what I put in the command line, but works just fine on the Mac. I can edit locally and upload to the Ubuntu installations, but this is not a viable long-term solution.
Unfortunately, I don't have the time to learn Python to try to identify the error - but I do know that it pywikipediabot shouldn't completely break every time there is a minor upgrade to MediaWiki. It's great when it works, but when it doesn't, I find myself wishing for less fragile solution.
----------------------------------------------------------------------
>Comment By: xqt (xqt)
Date: 2010-09-15 12:16
Message:
btw. allpages() hasn't changed since r8350
http://svn.wikimedia.org/viewvc/pywikipedia/trunk/pywikipedia/wikipedia.py?…
----------------------------------------------------------------------
Comment By: xqt (xqt)
Date: 2010-09-15 12:14
Message:
Try r8560 and check it with -verbose. It looks like an API error since
'query' is not in data object.
Maybe there is something wrong with json module? You have different Python
versions.
----------------------------------------------------------------------
Comment By: https://www.google.com/accounts ()
Date: 2010-09-14 06:31
Message:
Update: On further investigation, it looks like there was some sort of
change introduced in pywikipediabot, NOT mediawiki.
Version string on the Mac:
Pywikipedia nightly:pywikipedia (r8350, 2010/07/09, 08:02:52)
Python 2.6.1 (r261:67515, Feb 11 2010, 00:51:29)
[GCC 4.2.1 (Apple Inc. build 5646)]
config-settings:
use_api = True
use_api_login = True
On one of the Ubuntu boxes:
Pywikipedia [http] trunk/pywikipedia (r8551, 2010/09/13, 15:49:35)
Python 2.5.2 (r252:60911, Jan 20 2010, 21:48:48)
[GCC 4.2.4 (Ubuntu 4.2.4-1ubuntu3)]
config-settings:
use_api = True
use_api_login = True
Any ideas?
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603139&aid=3065711&group_…
Support Requests item #3065711, was opened at 2010-09-14 06:14
Message generated for change (Comment added) made by xqt
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603139&aid=3065711&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: Install Problem
Group: None
Status: Open
Priority: 5
Private: No
Submitted By: https://www.google.com/accounts ()
>Assigned to: xqt (xqt)
Summary: replace.py appears to be broken with MW 1.15.5 on Ubuntu
Initial Comment:
On Ubuntu 10.04 and 8.04, when I try to run replace.py from the 2010-09-13 version in SVN:
Traceback (most recent call last):
File "/path/to/pywikipedia/pagegenerators.py", line 1225, in __iter__
for page in self.wrapped_gen:
File "/path/to/pywikipedia/pagegenerators.py", line 1157, in DuplicateFilterPageGenerator
for page in generator:
File "path/to/pywikipedia/pagegenerators.py", line 617, in AllpagesPageGenerator
includeredirects=includeredirects):
File "/path/to/pywikipedia/wikipedia.py", line 6431, in allpages
for p in data['query']['allpages']:
KeyError: 'query'
'query'
Replace.py works on an identical installation on a Mac using the same versions of Apache, PHP, and MySQL. This problem showed up when I upgraded to MW 1.15.5 from 1.15.4 on Ubuntu - no problems whatsoever on the Mac after the upgrade.
I would prefer to go to 1.16, but I am using an extension (SMWHalo) that does not yet work with that version.
Any ideas? The problem arises no matter what I put in the command line, but works just fine on the Mac. I can edit locally and upload to the Ubuntu installations, but this is not a viable long-term solution.
Unfortunately, I don't have the time to learn Python to try to identify the error - but I do know that it pywikipediabot shouldn't completely break every time there is a minor upgrade to MediaWiki. It's great when it works, but when it doesn't, I find myself wishing for less fragile solution.
----------------------------------------------------------------------
>Comment By: xqt (xqt)
Date: 2010-09-15 12:14
Message:
Try r8560 and check it with -verbose. It looks like an API error since
'query' is not in data object.
Maybe there is something wrong with json module? You have different Python
versions.
----------------------------------------------------------------------
Comment By: https://www.google.com/accounts ()
Date: 2010-09-14 06:31
Message:
Update: On further investigation, it looks like there was some sort of
change introduced in pywikipediabot, NOT mediawiki.
Version string on the Mac:
Pywikipedia nightly:pywikipedia (r8350, 2010/07/09, 08:02:52)
Python 2.6.1 (r261:67515, Feb 11 2010, 00:51:29)
[GCC 4.2.1 (Apple Inc. build 5646)]
config-settings:
use_api = True
use_api_login = True
On one of the Ubuntu boxes:
Pywikipedia [http] trunk/pywikipedia (r8551, 2010/09/13, 15:49:35)
Python 2.5.2 (r252:60911, Jan 20 2010, 21:48:48)
[GCC 4.2.4 (Ubuntu 4.2.4-1ubuntu3)]
config-settings:
use_api = True
use_api_login = True
Any ideas?
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603139&aid=3065711&group_…
Bugs item #3066490, was opened at 2010-09-15 05:03
Message generated for change (Comment added) made by xqt
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3066490&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: 8
Private: No
Submitted By: Mikko Silvonen (silvonen)
>Assigned to: xqt (xqt)
Summary: Syntax error in wikipedia.py
Initial Comment:
>interwiki.py
Traceback (most recent call last):
File "C:\svn\pywikipedia\interwiki.py", line 340, in <module>
import wikipedia as pywikibot
File "C:\svn\pywikipedia\wikipedia.py", line 2758
it total == None:
^
SyntaxError: invalid syntax
>python version.py
Pywikipedia [http] trunk/pywikipedia (r8556, 2010/09/14, 22:07:50)
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
----------------------------------------------------------------------
>Comment By: xqt (xqt)
Date: 2010-09-15 08:22
Message:
fixed in r8557. Thanks and sorry
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3066490&group_…
Bugs item #3066490, was opened at 2010-09-15 06:03
Message generated for change (Settings changed) made by silvonen
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3066490&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: 8
Private: No
Submitted By: Mikko Silvonen (silvonen)
Assigned to: Nobody/Anonymous (nobody)
Summary: Syntax error in wikipedia.py
Initial Comment:
>interwiki.py
Traceback (most recent call last):
File "C:\svn\pywikipedia\interwiki.py", line 340, in <module>
import wikipedia as pywikibot
File "C:\svn\pywikipedia\wikipedia.py", line 2758
it total == None:
^
SyntaxError: invalid syntax
>python version.py
Pywikipedia [http] trunk/pywikipedia (r8556, 2010/09/14, 22:07:50)
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
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3066490&group_…
Bugs item #3066490, was opened at 2010-09-15 06:03
Message generated for change (Tracker Item Submitted) made by silvonen
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3066490&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: Syntax error in wikipedia.py
Initial Comment:
>interwiki.py
Traceback (most recent call last):
File "C:\svn\pywikipedia\interwiki.py", line 340, in <module>
import wikipedia as pywikibot
File "C:\svn\pywikipedia\wikipedia.py", line 2758
it total == None:
^
SyntaxError: invalid syntax
>python version.py
Pywikipedia [http] trunk/pywikipedia (r8556, 2010/09/14, 22:07:50)
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
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3066490&group_…
Feature Requests item #3054755, was opened at 2010-08-28 08:43
Message generated for change (Settings changed) made by xqt
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603141&aid=3054755&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: 7
Private: No
Submitted By: Bináris (binbot)
>Assigned to: xqt (xqt)
Summary: Edit filter labels and page sizes in version history
Initial Comment:
Would it be possible to have the labels made by the edit filters in Page.getVersionHistoryTable, Page.getVersionHistory and Page.fullVersionHistory? There may be several of them for one edit.
----------------------------------------------------------------------
>Comment By: xqt (xqt)
Date: 2010-09-15 00:12
Message:
done in r8446. Thanks
----------------------------------------------------------------------
Comment By: Bináris (binbot)
Date: 2010-09-13 13:01
Message:
I have uploaded a diff, thanks to Tgr. Please use it, because we would like
to reach these features of API. Thank you!
----------------------------------------------------------------------
Comment By: Bináris (binbot)
Date: 2010-08-30 23:19
Message:
I attached a possible solution, please use it. Credits to Tgr and Hunyadym
from huwiki.
----------------------------------------------------------------------
Comment By: Bináris (binbot)
Date: 2010-08-29 20:43
Message:
And the size as well. Now if I want to work with page sizes, I have to load
fullVersionHistory, which makes the script slow down.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603141&aid=3054755&group_…
Support Requests item #3065711, was opened at 2010-09-14 04:14
Message generated for change (Comment added) made by
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603139&aid=3065711&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: Install Problem
Group: None
Status: Open
Priority: 5
Private: No
Submitted By: https://www.google.com/accounts ()
Assigned to: Nobody/Anonymous (nobody)
Summary: replace.py appears to be broken with MW 1.15.5 on Ubuntu
Initial Comment:
On Ubuntu 10.04 and 8.04, when I try to run replace.py from the 2010-09-13 version in SVN:
Traceback (most recent call last):
File "/path/to/pywikipedia/pagegenerators.py", line 1225, in __iter__
for page in self.wrapped_gen:
File "/path/to/pywikipedia/pagegenerators.py", line 1157, in DuplicateFilterPageGenerator
for page in generator:
File "path/to/pywikipedia/pagegenerators.py", line 617, in AllpagesPageGenerator
includeredirects=includeredirects):
File "/path/to/pywikipedia/wikipedia.py", line 6431, in allpages
for p in data['query']['allpages']:
KeyError: 'query'
'query'
Replace.py works on an identical installation on a Mac using the same versions of Apache, PHP, and MySQL. This problem showed up when I upgraded to MW 1.15.5 from 1.15.4 on Ubuntu - no problems whatsoever on the Mac after the upgrade.
I would prefer to go to 1.16, but I am using an extension (SMWHalo) that does not yet work with that version.
Any ideas? The problem arises no matter what I put in the command line, but works just fine on the Mac. I can edit locally and upload to the Ubuntu installations, but this is not a viable long-term solution.
Unfortunately, I don't have the time to learn Python to try to identify the error - but I do know that it pywikipediabot shouldn't completely break every time there is a minor upgrade to MediaWiki. It's great when it works, but when it doesn't, I find myself wishing for less fragile solution.
----------------------------------------------------------------------
>Comment By: https://www.google.com/accounts ()
Date: 2010-09-14 04:31
Message:
Update: On further investigation, it looks like there was some sort of
change introduced in pywikipediabot, NOT mediawiki.
Version string on the Mac:
Pywikipedia nightly:pywikipedia (r8350, 2010/07/09, 08:02:52)
Python 2.6.1 (r261:67515, Feb 11 2010, 00:51:29)
[GCC 4.2.1 (Apple Inc. build 5646)]
config-settings:
use_api = True
use_api_login = True
On one of the Ubuntu boxes:
Pywikipedia [http] trunk/pywikipedia (r8551, 2010/09/13, 15:49:35)
Python 2.5.2 (r252:60911, Jan 20 2010, 21:48:48)
[GCC 4.2.4 (Ubuntu 4.2.4-1ubuntu3)]
config-settings:
use_api = True
use_api_login = True
Any ideas?
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603139&aid=3065711&group_…
Support Requests item #3065711, was opened at 2010-09-14 04:14
Message generated for change (Tracker Item Submitted) made by
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603139&aid=3065711&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: Install Problem
Group: None
Status: Open
Priority: 5
Private: No
Submitted By: https://www.google.com/accounts ()
Assigned to: Nobody/Anonymous (nobody)
Summary: replace.py appears to be broken with MW 1.15.5 on Ubuntu
Initial Comment:
On Ubuntu 10.04 and 8.04, when I try to run replace.py from the 2010-09-13 version in SVN:
Traceback (most recent call last):
File "/path/to/pywikipedia/pagegenerators.py", line 1225, in __iter__
for page in self.wrapped_gen:
File "/path/to/pywikipedia/pagegenerators.py", line 1157, in DuplicateFilterPageGenerator
for page in generator:
File "path/to/pywikipedia/pagegenerators.py", line 617, in AllpagesPageGenerator
includeredirects=includeredirects):
File "/path/to/pywikipedia/wikipedia.py", line 6431, in allpages
for p in data['query']['allpages']:
KeyError: 'query'
'query'
Replace.py works on an identical installation on a Mac using the same versions of Apache, PHP, and MySQL. This problem showed up when I upgraded to MW 1.15.5 from 1.15.4 on Ubuntu - no problems whatsoever on the Mac after the upgrade.
I would prefer to go to 1.16, but I am using an extension (SMWHalo) that does not yet work with that version.
Any ideas? The problem arises no matter what I put in the command line, but works just fine on the Mac. I can edit locally and upload to the Ubuntu installations, but this is not a viable long-term solution.
Unfortunately, I don't have the time to learn Python to try to identify the error - but I do know that it pywikipediabot shouldn't completely break every time there is a minor upgrade to MediaWiki. It's great when it works, but when it doesn't, I find myself wishing for less fragile solution.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603139&aid=3065711&group_…
Bugs item #3053539, was opened at 2010-08-26 10:05
Message generated for change (Comment added) made by djbarrett
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3053539&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: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Daniel Barrett (djbarrett)
Assigned to: Nobody/Anonymous (nobody)
Summary: category.py move ignores noinclude, includeonly
Initial Comment:
When running "python category.py move", if the old category is enclosed in <noinclude> or <includeonly> tags, the new, replaced category is not, which is a problem. For example, this construction:
<includeonly>[[Category:Foo]]</includeonly>
when operated on by:
python category.py move -from:"Foo" -to:"Bar"
produces:
<includeonly></includeonly>
[[Category:Bar]]
which is wrong.
This bug has existed for a long time, at least a few years.
$ python version.py
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
$ svn info
Revision: 8319
----------------------------------------------------------------------
>Comment By: Daniel Barrett (djbarrett)
Date: 2010-09-13 15:58
Message:
This bug is destructive to wiki articles. Any chance it will be addressed
soon? Thanks.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3053539&group_…
Feature Requests item #3054755, was opened at 2010-08-28 08:43
Message generated for change (Comment added) made by binbot
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603141&aid=3054755&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
>Priority: 7
Private: No
Submitted By: Bináris (binbot)
Assigned to: Nobody/Anonymous (nobody)
Summary: Edit filter labels and page sizes in version history
Initial Comment:
Would it be possible to have the labels made by the edit filters in Page.getVersionHistoryTable, Page.getVersionHistory and Page.fullVersionHistory? There may be several of them for one edit.
----------------------------------------------------------------------
>Comment By: Bináris (binbot)
Date: 2010-09-13 13:01
Message:
I have uploaded a diff, thanks to Tgr. Please use it, because we would like
to reach these features of API. Thank you!
----------------------------------------------------------------------
Comment By: Bináris (binbot)
Date: 2010-08-30 23:19
Message:
I attached a possible solution, please use it. Credits to Tgr and Hunyadym
from huwiki.
----------------------------------------------------------------------
Comment By: Bináris (binbot)
Date: 2010-08-29 20:43
Message:
And the size as well. Now if I want to work with page sizes, I have to load
fullVersionHistory, which makes the script slow down.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603141&aid=3054755&group_…
Bugs item #2787057, was opened at 2009-05-05 08:54
Message generated for change (Comment added) made by xqt
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2787057&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: 7
Private: No
Submitted By: siebrand (siebrand)
>Assigned to: xqt (xqt)
Summary: Commonscat: removing labels when it should not
Initial Comment:
See edit[1]. The bot replaces the current template {{commonscat|cat|desc}} with {{commonscat|cat}}. That should not happen. Originally reported here[2] and replied here[3]
[1] http://fr.wikipedia.org/w/index.php?title=Cat%C3%A9gorie:Personnalit%C3%A9_…
[2] http://nl.wikipedia.org/w/index.php?title=Overleg_gebruiker:Siebrand&oldid=…
[3] http://fr.wikipedia.org/w/index.php?title=Discussion_utilisateur:Jean-Fr%C3…
----------------------------------------------------------------------
>Comment By: xqt (xqt)
Date: 2010-09-13 11:45
Message:
done in r8546
----------------------------------------------------------------------
Comment By: Multichill (multichill)
Date: 2009-05-06 13:54
Message:
I'm thinking about doing an overhaul of the bot to be more flexible. This
should also be part of it.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2787057&group_…
Feature Requests item #2744607, was opened at 2009-04-08 18:06
Message generated for change (Comment added) made by xqt
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603141&aid=2744607&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: Closed
Priority: 6
Private: No
Submitted By: Nobody/Anonymous (nobody)
>Assigned to: xqt (xqt)
Summary: interwiki -force-option
Initial Comment:
__version__ = '$Id: interwiki.py 6482 2009-03-03 22:13:15Z purodha $'
Please give the choice to force deleted pages only. There is a lot of trouble about mismatched disambiguation state because some sites doesn't have a equivalent disambig template or wish pages without them.
<w:de:user:xqt>
----------------------------------------------------------------------
>Comment By: xqt (xqt)
Date: 2010-09-12 17:01
Message:
self.done in r8536
----------------------------------------------------------------------
Comment By: xqt (xqt)
Date: 2010-09-10 01:43
Message:
This is also requested as -cleanup option with tracker #3062725
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603141&aid=2744607&group_…
Feature Requests item #3041978, was opened at 2010-08-09 15:52
Message generated for change (Comment added) made by nobody
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603141&aid=3041978&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: Pending
Priority: 5
Private: No
Submitted By: Nobody/Anonymous (nobody)
Assigned to: xqt (xqt)
Summary: featured.py: About page sorting
Initial Comment:
featured.py: I think good to sort by page-title's utf-8. For "-after" arguments. Now, FAs / GAs from template or category are sorted by pageids or sortkeys.
----------------------------------------------------------------------
Comment By: Nobody/Anonymous (nobody)
Date: 2010-09-12 02:12
Message:
I recognize that.
MediaWiki sort backlinks of template by pageid and category's pages by
sortkey.
These are not sorted by Unicode.
But, "after" parameter compare Unicode of these page's titles.
----------------------------------------------------------------------
Comment By: xqt (xqt)
Date: 2010-09-09 23:50
Message:
Sorry, I am at a loss. Could you explain?
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603141&aid=3041978&group_…
Patches item #3064024, was opened at 2010-09-11 05:08
Message generated for change (Comment added) made by xqt
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603140&aid=3064024&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: Accepted
Priority: 5
Private: No
Submitted By: zedlik (zedlik)
>Assigned to: xqt (xqt)
Summary: be-x-old ignore template for commonscat
Initial Comment:
hello,
please add an ignore template for be-x-old wiki into commonscat.py.
thank you.
----------------------------------------------------------------------
>Comment By: xqt (xqt)
Date: 2010-09-11 12:50
Message:
done in r8521. Thanks.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603140&aid=3064024&group_…
Patches item #3064024, was opened at 2010-09-11 06:08
Message generated for change (Tracker Item Submitted) made by zedlik
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603140&aid=3064024&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: zedlik (zedlik)
Assigned to: Nobody/Anonymous (nobody)
Summary: be-x-old ignore template for commonscat
Initial Comment:
hello,
please add an ignore template for be-x-old wiki into commonscat.py.
thank you.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603140&aid=3064024&group_…
Feature Requests item #3041978, was opened at 2010-08-09 17:52
Message generated for change (Comment added) made by xqt
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603141&aid=3041978&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: Pending
Priority: 5
Private: No
Submitted By: Nobody/Anonymous (nobody)
>Assigned to: xqt (xqt)
Summary: featured.py: About page sorting
Initial Comment:
featured.py: I think good to sort by page-title's utf-8. For "-after" arguments. Now, FAs / GAs from template or category are sorted by pageids or sortkeys.
----------------------------------------------------------------------
>Comment By: xqt (xqt)
Date: 2010-09-10 01:50
Message:
Sorry, I am at a loss. Could you explain?
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603141&aid=3041978&group_…
Bugs item #3062725, was opened at 2010-09-09 17:20
Message generated for change (Comment added) made by xqt
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3062725&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: Closed
>Resolution: Duplicate
Priority: 5
Private: No
Submitted By: Nobody/Anonymous (nobody)
>Assigned to: xqt (xqt)
Summary: cleanup for interwiki
Initial Comment:
would it be possible to introduce -cleanup option which would work similar to -force but allowing only one 'controversial' change, i.e. ONLY remove interwiki links to non-existent pages, categories, etc. without touching any other problematic links (like disambig status or namespace mismatch)? this would be much safer to use in -autonomous mode than the current -force option, and it may be useful to remove some 'duplicate interwiki on same site' if a page or category was moved with redirect suppressed or simply deleted.
----------------------------------------------------------------------
>Comment By: xqt (xqt)
Date: 2010-09-10 01:44
Message:
duplicate to feature request #2744607
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3062725&group_…
Feature Requests item #2744607, was opened at 2009-04-08 18:06
Message generated for change (Comment added) made by xqt
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603141&aid=2744607&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
>Priority: 6
Private: No
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: interwiki -force-option
Initial Comment:
__version__ = '$Id: interwiki.py 6482 2009-03-03 22:13:15Z purodha $'
Please give the choice to force deleted pages only. There is a lot of trouble about mismatched disambiguation state because some sites doesn't have a equivalent disambig template or wish pages without them.
<w:de:user:xqt>
----------------------------------------------------------------------
>Comment By: xqt (xqt)
Date: 2010-09-10 01:43
Message:
This is also requested as -cleanup option with tracker #3062725
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603141&aid=2744607&group_…
Bugs item #3062725, was opened at 2010-09-09 15:20
Message generated for change (Tracker Item Submitted) made by nobody
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3062725&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: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: cleanup for interwiki
Initial Comment:
would it be possible to introduce -cleanup option which would work similar to -force but allowing only one 'controversial' change, i.e. ONLY remove interwiki links to non-existent pages, categories, etc. without touching any other problematic links (like disambig status or namespace mismatch)? this would be much safer to use in -autonomous mode than the current -force option, and it may be useful to remove some 'duplicate interwiki on same site' if a page or category was moved with redirect suppressed or simply deleted.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3062725&group_…
Bugs item #3061979, was opened at 2010-09-08 16:40
Message generated for change (Settings changed) made by xqt
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3061979&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: Closed
>Resolution: Invalid
Priority: 5
Private: No
Submitted By: Nobody/Anonymous (nobody)
>Assigned to: xqt (xqt)
Summary: -debug option not working
Initial Comment:
-debug option from wikipedia.py is supposed to work for all scripts, right? and the purpose of it is to yield output to screen and log files without actually editing live pages? I tried to use it with interwiki.py script but it seems not working as expected. Even with this option specified as one of parameters, interwiki.py makes edits on pages. Could you please make -debug option working for interwiki.py as well, please?
Pywikipedia [http] trunk/pywikipedia (r8492, 2010/09/07, 20:23:34)
Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit (Intel)]
config-settings:
use_api = True
use_api_login = True
----------------------------------------------------------------------
>Comment By: xqt (xqt)
Date: 2010-09-08 17:05
Message:
global debug option is for development purposes only and hidden in -help
option. Normally it does nothing except setting pecial_page_limit to 500.
In basic.py the old -debug option has changed to -dry which prevents
editing pages.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3061979&group_…
Bugs item #3061979, was opened at 2010-09-08 14:40
Message generated for change (Tracker Item Submitted) made by nobody
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3061979&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: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: -debug option not working
Initial Comment:
-debug option from wikipedia.py is supposed to work for all scripts, right? and the purpose of it is to yield output to screen and log files without actually editing live pages? I tried to use it with interwiki.py script but it seems not working as expected. Even with this option specified as one of parameters, interwiki.py makes edits on pages. Could you please make -debug option working for interwiki.py as well, please?
Pywikipedia [http] trunk/pywikipedia (r8492, 2010/09/07, 20:23:34)
Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit (Intel)]
config-settings:
use_api = True
use_api_login = True
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3061979&group_…
Bugs item #3059367, was opened at 2010-09-04 16:53
Message generated for change (Comment added) made by xqt
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3059367&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: JAn (jandudik)
Assigned to: xqt (xqt)
Summary: Persons
Initial Comment:
There is bug in adding category with parameter -person:
Bot adds category duplicate
http://cs.wikipedia.org/w/index.php?title=Lucie_B%C3%ADl%C3%A1&diff=prev&ol…http://cs.wikipedia.org/w/index.php?title=Lucie_Borhyov%C3%A1&diff=prev&old…
And there might be better to add {{DEFAULTSORT:Surname, Name}}, [[Category:Foo]] instead of [[Category:Foo|Surname, Name]]
----------------------------------------------------------------------
>Comment By: xqt (xqt)
Date: 2010-09-08 15:16
Message:
done in r8496
----------------------------------------------------------------------
Comment By: xqt (xqt)
Date: 2010-09-08 14:33
Message:
Forget my last comment. This bug is still remaining with -person option.
Working on a fix...
----------------------------------------------------------------------
Comment By: xqt (xqt)
Date: 2010-09-08 14:19
Message:
Could you please check whether this works with the new category release
8494? Debugging it is a mess. It seems title[:1].capitalize() didn't work
whereas title[:1].upper() does it.
I also changed the behaviour for change confirmation thus you'll first see
the diff.
I've tested your problem on my test page at de-wiki with python 2.7 and it
worked for me:
>>> import wikipedia as wp
>>> import category as cat
>>> page = wp.Page('de','user:xqt/Test')
bot = cat.AddCategory([page], sort_by_last_name=True)
>>> bot.run()
Category to add (do not give namespace): ženy
>>> Benutzer:Xqt/Test <<<
Current categories:
* Kategorie:Ženy
* Kategorie:Narození 1978
* Kategorie:Žijící lidé
* Kategorie:TV Nova
* Kategorie:Ceští moderátori
* Kategorie:Ženy
Benutzer:Xqt/Test is already in Kategorie:Ženy.
1 page(s) processed.
>>>
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3059367&group_…
Bugs item #3059367, was opened at 2010-09-04 16:53
Message generated for change (Comment added) made by xqt
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3059367&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: Open
>Resolution: None
Priority: 5
Private: No
Submitted By: JAn (jandudik)
Assigned to: xqt (xqt)
Summary: Persons
Initial Comment:
There is bug in adding category with parameter -person:
Bot adds category duplicate
http://cs.wikipedia.org/w/index.php?title=Lucie_B%C3%ADl%C3%A1&diff=prev&ol…http://cs.wikipedia.org/w/index.php?title=Lucie_Borhyov%C3%A1&diff=prev&old…
And there might be better to add {{DEFAULTSORT:Surname, Name}}, [[Category:Foo]] instead of [[Category:Foo|Surname, Name]]
----------------------------------------------------------------------
>Comment By: xqt (xqt)
Date: 2010-09-08 14:33
Message:
Forget my last comment. This bug is still remaining with -person option.
Working on a fix...
----------------------------------------------------------------------
Comment By: xqt (xqt)
Date: 2010-09-08 14:19
Message:
Could you please check whether this works with the new category release
8494? Debugging it is a mess. It seems title[:1].capitalize() didn't work
whereas title[:1].upper() does it.
I also changed the behaviour for change confirmation thus you'll first see
the diff.
I've tested your problem on my test page at de-wiki with python 2.7 and it
worked for me:
>>> import wikipedia as wp
>>> import category as cat
>>> page = wp.Page('de','user:xqt/Test')
bot = cat.AddCategory([page], sort_by_last_name=True)
>>> bot.run()
Category to add (do not give namespace): ženy
>>> Benutzer:Xqt/Test <<<
Current categories:
* Kategorie:Ženy
* Kategorie:Narození 1978
* Kategorie:Žijící lidé
* Kategorie:TV Nova
* Kategorie:Ceští moderátori
* Kategorie:Ženy
Benutzer:Xqt/Test is already in Kategorie:Ženy.
1 page(s) processed.
>>>
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3059367&group_…
Bugs item #3059367, was opened at 2010-09-04 16:53
Message generated for change (Comment added) made by xqt
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3059367&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: Pending
>Resolution: Works For Me
Priority: 5
Private: No
Submitted By: JAn (jandudik)
>Assigned to: xqt (xqt)
Summary: Persons
Initial Comment:
There is bug in adding category with parameter -person:
Bot adds category duplicate
http://cs.wikipedia.org/w/index.php?title=Lucie_B%C3%ADl%C3%A1&diff=prev&ol…http://cs.wikipedia.org/w/index.php?title=Lucie_Borhyov%C3%A1&diff=prev&old…
And there might be better to add {{DEFAULTSORT:Surname, Name}}, [[Category:Foo]] instead of [[Category:Foo|Surname, Name]]
----------------------------------------------------------------------
>Comment By: xqt (xqt)
Date: 2010-09-08 14:19
Message:
Could you please check whether this works with the new category release
8494? Debugging it is a mess. It seems title[:1].capitalize() didn't work
whereas title[:1].upper() does it.
I also changed the behaviour for change confirmation thus you'll first see
the diff.
I've tested your problem on my test page at de-wiki with python 2.7 and it
worked for me:
>>> import wikipedia as wp
>>> import category as cat
>>> page = wp.Page('de','user:xqt/Test')
bot = cat.AddCategory([page], sort_by_last_name=True)
>>> bot.run()
Category to add (do not give namespace): ženy
>>> Benutzer:Xqt/Test <<<
Current categories:
* Kategorie:Ženy
* Kategorie:Narození 1978
* Kategorie:Žijící lidé
* Kategorie:TV Nova
* Kategorie:Ceští moderátori
* Kategorie:Ženy
Benutzer:Xqt/Test is already in Kategorie:Ženy.
1 page(s) processed.
>>>
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3059367&group_…
Bugs item #3059970, was opened at 2010-09-05 22:35
Message generated for change (Comment added) made by xqt
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3059970&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: Merlijn S. van Deen (valhallasw)
>Assigned to: xqt (xqt)
Summary: Invalid image page title yields incorrect exception
Initial Comment:
valhallasw@nightshade:~/src/pywikipedia/pywikipedia$ cat test.py
# coding=utf-8
import wikipedia
print wikipedia.ImagePage(wikipedia.getSite('en', 'wiktionary'), u'{{zh-lookup|吗}}').fileIsOnCommons();
>>> wikipedia.ImagePage(wikipedia.getSite('en', 'wiktionary'), u'{{zh-lookup|吗}}').fileIsOnCommons();
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/valhallasw/src/pywikipedia/pywikipedia/wikipedia.py", line 3588, in fileIsOnCommons
self._loadInfo()
File "/home/valhallasw/src/pywikipedia/pywikipedia/wikipedia.py", line 3534, in _loadInfo
if data['query']['pages'].values()[0]["imagerepository"] == "shared":
KeyError: 'imagerepository'
-> if data['query']['pages'].values()[0]["imagerepository"] == "shared":
(Pdb) dir()
['count', 'data', 'limit', 'params', 'self']
(Pdb) data
{u'query': {u'pages': {u'-1': {u'invalid': u'', u'title': u'File:{{zh-lookup'}, u'-2': {u'invalid': u'', u'title': u'\u5417}}'}}}}
Obviously, this should have resulted in an InvalidTitle exception instead of a KeyError.
valhallasw@nightshade:~/src/pywikipedia/pywikipedia$ python version.py
Pywikipedia (r-1 (unknown), 0 (unknown))
Python 2.5.2 (r252:60911, Jan 24 2010, 17:44:40)
[GCC 4.3.2]
config-settings:
use_api = True
use_api_login = True
Running r8370 (under git-svn)
----------------------------------------------------------------------
>Comment By: xqt (xqt)
Date: 2010-09-07 22:25
Message:
done in r8492
I've used wikipedia.badTitle error in same way as in _getEditPage()
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3059970&group_…
Patches item #3055992, was opened at 2010-08-30 13:50
Message generated for change (Comment added) made by xqt
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603140&aid=3055992&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: Accepted
Priority: 5
Private: No
Submitted By: romain (romainhk)
>Assigned to: xqt (xqt)
Summary: getting categories via API
Initial Comment:
Method page.categories(api=True) didn't get enough results for pages with a lot of categories (for example on WP:en, with Talk:U2 or Talk:Unification of Germany, you only get the 10 first).
In fact, it's just an indentation error on the return in wikipedia.py at line 2247, which prevent the loop to get all of them.
----------------------------------------------------------------------
>Comment By: xqt (xqt)
Date: 2010-09-07 21:53
Message:
done in r8491. thanks
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603140&aid=3055992&group_…
Bugs item #3058111, was opened at 2010-09-02 13:05
Message generated for change (Comment added) made by xqt
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3058111&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: Accepted
Priority: 5
Private: No
Submitted By: Nobody/Anonymous (nobody)
>Assigned to: xqt (xqt)
Summary: redirect.py update for Russian
Initial Comment:
Please update delete summary and delete template for Russian in redirect.py
----------------------------------------------------------------------
>Comment By: xqt (xqt)
Date: 2010-09-07 21:33
Message:
done in r8489. thanks
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3058111&group_…
Bugs item #3060262, was opened at 2010-09-06 11:25
Message generated for change (Comment added) made by xqt
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3060262&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: other
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 7
Private: No
Submitted By: Mercy (wikimercy)
>Assigned to: xqt (xqt)
Summary: commonscat.py addition for sv.wikipedia
Initial Comment:
Hi, could you please add the following template to be ignored? Thank you!
ignoreTemplates = {
'sv' : [u'commonscatbox'],
----------------------------------------------------------------------
>Comment By: xqt (xqt)
Date: 2010-09-07 21:19
Message:
done in r8488
pls check whether this is done as u expected
----------------------------------------------------------------------
Comment By: Mercy (wikimercy)
Date: 2010-09-06 22:42
Message:
Please add also the following expression to the previous string:
u'Commonscat-box'
----------------------------------------------------------------------
Comment By: Mercy (wikimercy)
Date: 2010-09-06 22:08
Message:
UPDATE: Instead of the former requested addition, please make the following
update:
commonscatTemplates = {
'sv' : (u'Commonscat', [u'Commonscat-rad', u'Commonskat', u'Commons
cat', u'Commonscatbox']),
Thanks a lot!
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3060262&group_…
Bugs item #3060262, was opened at 2010-09-06 11:25
Message generated for change (Comment added) made by wikimercy
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3060262&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: other
Group: None
Status: Open
Resolution: None
>Priority: 7
Private: No
Submitted By: Mercy (wikimercy)
Assigned to: Nobody/Anonymous (nobody)
Summary: commonscat.py addition for sv.wikipedia
Initial Comment:
Hi, could you please add the following template to be ignored? Thank you!
ignoreTemplates = {
'sv' : [u'commonscatbox'],
----------------------------------------------------------------------
>Comment By: Mercy (wikimercy)
Date: 2010-09-06 22:42
Message:
Please add also the following expression to the previous string:
u'Commonscat-box'
----------------------------------------------------------------------
Comment By: Mercy (wikimercy)
Date: 2010-09-06 22:08
Message:
UPDATE: Instead of the former requested addition, please make the following
update:
commonscatTemplates = {
'sv' : (u'Commonscat', [u'Commonscat-rad', u'Commonskat', u'Commons
cat', u'Commonscatbox']),
Thanks a lot!
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3060262&group_…
Bugs item #3060262, was opened at 2010-09-06 11:25
Message generated for change (Settings changed) made by wikimercy
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3060262&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: other
Group: None
Status: Open
Resolution: None
>Priority: 9
Private: No
Submitted By: Mercy (wikimercy)
Assigned to: Nobody/Anonymous (nobody)
Summary: commonscat.py addition for sv.wikipedia
Initial Comment:
Hi, could you please add the following template to be ignored? Thank you!
ignoreTemplates = {
'sv' : [u'commonscatbox'],
----------------------------------------------------------------------
>Comment By: Mercy (wikimercy)
Date: 2010-09-06 22:08
Message:
UPDATE: Instead of the former requested addition, please make the following
update:
commonscatTemplates = {
'sv' : (u'Commonscat', [u'Commonscat-rad', u'Commonskat', u'Commons
cat', u'Commonscatbox']),
Thanks a lot!
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3060262&group_…
Bugs item #3060262, was opened at 2010-09-06 11:25
Message generated for change (Tracker Item Submitted) made by wikimercy
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3060262&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: other
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Mercy (wikimercy)
Assigned to: Nobody/Anonymous (nobody)
Summary: commonscat.py addition for sv.wikipedia
Initial Comment:
Hi, could you please add the following template to be ignored? Thank you!
ignoreTemplates = {
'sv' : [u'commonscatbox'],
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3060262&group_…
Bugs item #3059970, was opened at 2010-09-05 22:35
Message generated for change (Tracker Item Submitted) made by valhallasw
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3059970&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: Merlijn S. van Deen (valhallasw)
Assigned to: Nobody/Anonymous (nobody)
Summary: Invalid image page title yields incorrect exception
Initial Comment:
valhallasw@nightshade:~/src/pywikipedia/pywikipedia$ cat test.py
# coding=utf-8
import wikipedia
print wikipedia.ImagePage(wikipedia.getSite('en', 'wiktionary'), u'{{zh-lookup|吗}}').fileIsOnCommons();
>>> wikipedia.ImagePage(wikipedia.getSite('en', 'wiktionary'), u'{{zh-lookup|吗}}').fileIsOnCommons();
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/valhallasw/src/pywikipedia/pywikipedia/wikipedia.py", line 3588, in fileIsOnCommons
self._loadInfo()
File "/home/valhallasw/src/pywikipedia/pywikipedia/wikipedia.py", line 3534, in _loadInfo
if data['query']['pages'].values()[0]["imagerepository"] == "shared":
KeyError: 'imagerepository'
-> if data['query']['pages'].values()[0]["imagerepository"] == "shared":
(Pdb) dir()
['count', 'data', 'limit', 'params', 'self']
(Pdb) data
{u'query': {u'pages': {u'-1': {u'invalid': u'', u'title': u'File:{{zh-lookup'}, u'-2': {u'invalid': u'', u'title': u'\u5417}}'}}}}
Obviously, this should have resulted in an InvalidTitle exception instead of a KeyError.
valhallasw@nightshade:~/src/pywikipedia/pywikipedia$ python version.py
Pywikipedia (r-1 (unknown), 0 (unknown))
Python 2.5.2 (r252:60911, Jan 24 2010, 17:44:40)
[GCC 4.3.2]
config-settings:
use_api = True
use_api_login = True
Running r8370 (under git-svn)
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3059970&group_…
Bugs item #3058111, was opened at 2010-09-02 11:05
Message generated for change (Tracker Item Submitted) made by nobody
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3058111&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: redirect.py update for Russian
Initial Comment:
Please update delete summary and delete template for Russian in redirect.py
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3058111&group_…