print len(page.getVersionHistory(getAll=True, reverseOrder=True)) print len(page.fullVersionHistory(getAll=True, reverseOrder=True))
3838 258
Where did I make a mistake? Framework is of 1 January, did something change since then concerning fullVersionHistory?
Some more info to check. Core or Compat? Which Site/Page?
Mpaa
On Fri, Apr 4, 2014 at 11:26 PM, Bináris wikiposta@gmail.com wrote:
print len(page.getVersionHistory(getAll=True, reverseOrder=True)) print len(page.fullVersionHistory(getAll=True, reverseOrder=True))
3838 258
Where did I make a mistake? Framework is of 1 January, did something change since then concerning fullVersionHistory?
-- Bináris
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
The so called "compat" version. hu:user talk:Bináris
2014-04-05 1:03 GMT+02:00 Mpaa mpaa.wiki@gmail.com:
Some more info to check. Core or Compat? Which Site/Page?
Mpaa
On Fri, Apr 4, 2014 at 11:26 PM, Bináris wikiposta@gmail.com wrote:
print len(page.getVersionHistory(getAll=True, reverseOrder=True)) print len(page.fullVersionHistory(getAll=True, reverseOrder=True))
3838 258
Where did I make a mistake? Framework is of 1 January, did something change since then concerning fullVersionHistory?
-- Bináris
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
I tried an other approach: I loop with getVersionHistory() which gives me oldid, date and size which I need, and call getOldVersion() for each oldid. The sad experience is that the script becomes extremely slow. As the page under investigation is usually quite big (it's a long talk page) and the loop is so slow, I got the idea that there might be a memory problem with the first version.
Is it a possible behaviour of Python 2.7.2 that instead of explicitely throwing a memory error it just breaks from the loop without notice?
Some experiments, all under hu: in Wikipedia. A possible conclusion is that some API limit is broken at pages with long history while for short histories the results are identical.
site = pywikibot.getSite() page = pywikibot.Page(site, what) print len(page.getVersionHistory(getAll=True, reverseOrder=True)) print len(page.fullVersionHistory(getAll=True, reverseOrder=True))
what = u'Földvár (építmény)' 68 68
what = u'Triatlon' 127 127
what = u'Magyarország' (This is the "Hungary" article in huwiki with many edits.) 3510 812
what = u'User:BinBot/try' (This is not big but has several edits. In this case getVersionHistory() also takes some minutes!) 53833 2902
what = u'Wikipédia:Kocsmafal (egyéb)' (This is the main village pump of huwiki, several times edited a day.) 48155 156
In the last two cases getVersionHistory()was very slow and fullVersionHistory fast but erroneous.
Let's try some other wikis: what = u'en:Triathlon' 2039 893
what = u'de:Szeged' 528 528
what = u'de:Berlin' 7041 912
Next stage. It becomes more and more horroristic. I downloaded the latest "compat" from nightlies and unpacked. It is one third in size than that of 11 January. After unpacking version.py says: c:\Pywikipedia>version.py syntax error: line 1, column 0 Serious import error; pywikibot not available - was it configured? Traceback (most recent call last): File "C:\Pywikipedia\version.py", line 20, in <module> pywikibot.output('Pywikibot: %s' % getversion()) AttributeError: 'module' object has no attribute 'output'
version.py may have perhaps misunderstood something, I didn't want to configure anything, i just wanted to update my WORKING copy. Then I tried to restore the previous version but the result is the same, my Pywikibot does not work any more. I had a working version and tried to update it in a normal way before somebody cleverly asks me to do so, and I only have broken ruins.
*I am totally fed up with this whole mess!* Give us back Pywikibot!
What kind of configuration this mess wants me? As far as I know trunk never needed any configuration except user files. Tell me only one reason not to be angry.
2014-04-05 8:39 GMT+02:00 Bináris wikiposta@gmail.com:
Next stage. It becomes more and more horroristic. I downloaded the latest "compat" from nightlies and unpacked. It is one third in size than that of 11 January. After unpacking version.py says: c:\Pywikipedia>version.py syntax error: line 1, column 0 Serious import error; pywikibot not available - was it configured? Traceback (most recent call last): File "C:\Pywikipedia\version.py", line 20, in <module> pywikibot.output('Pywikibot: %s' % getversion()) AttributeError: 'module' object has no attribute 'output'
version.py may have perhaps misunderstood something, I didn't want to configure anything, i just wanted to update my WORKING copy. Then I tried to restore the previous version but the result is the same, my Pywikibot does not work any more. I had a working version and tried to update it in a normal way before somebody cleverly asks me to do so, and I only have broken ruins.
*I am totally fed up with this whole mess!* Give us back Pywikibot!
I made a patch to fix it
https://gerrit.wikimedia.org/r/121891
Review it please :)
On 4/5/14, Bináris wikiposta@gmail.com wrote:
What kind of configuration this mess wants me? As far as I know trunk never needed any configuration except user files. Tell me only one reason not to be angry.
2014-04-05 8:39 GMT+02:00 Bináris wikiposta@gmail.com:
Next stage. It becomes more and more horroristic. I downloaded the latest "compat" from nightlies and unpacked. It is one third in size than that of 11 January. After unpacking version.py says: c:\Pywikipedia>version.py syntax error: line 1, column 0 Serious import error; pywikibot not available - was it configured? Traceback (most recent call last): File "C:\Pywikipedia\version.py", line 20, in <module> pywikibot.output('Pywikibot: %s' % getversion()) AttributeError: 'module' object has no attribute 'output'
version.py may have perhaps misunderstood something, I didn't want to configure anything, i just wanted to update my WORKING copy. Then I tried to restore the previous version but the result is the same, my Pywikibot does not work any more. I had a working version and tried to update it in a normal way before somebody cleverly asks me to do so, and I only have broken ruins.
*I am totally fed up with this whole mess!* Give us back Pywikibot!
-- Bináris
pywikipedia-l@lists.wikimedia.org