Bugs item #2970545, was opened at 2010-03-15 10:46 Message generated for change (Comment added) made by xqt You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2970545...
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: masti (masti01) Assigned to: xqt (xqt) Summary: wikipedia.py - oneDoneAPI further errors
Initial Comment: it looks that there are some more erros in thin function. After fixing problems with editRestriction variables in # 2970417 other variables generate simmilar error: File "/usr/home/masti/pw/pywikipedia/pagegenerators.py", line 879, in __iter__ for loaded_page in self.preload(somePages): File "/usr/home/masti/pw/pywikipedia/pagegenerators.py", line 904, in preload pywikibot.getall(site, pagesThisSite) File "/usr/home/masti/pw/pywikipedia/wikipedia.py", line 4036, in getall _GetAll(site, k, throttle, force).run() File "/usr/home/masti/pw/pywikipedia/wikipedia.py", line 3689, in run self.oneDoneApi(vals) File "/usr/home/masti/pw/pywikipedia/wikipedia.py", line 3911, in oneDoneApi page2._permalink = revisionId UnboundLocalError: local variable 'revisionId' referenced before assignment local variable 'revisionId' referenced before assignment
when I fixed that other appear: Traceback (most recent call last): File "/usr/home/masti/pw/pywikipedia/pagegenerators.py", line 879, in __iter__ for loaded_page in self.preload(somePages): File "/usr/home/masti/pw/pywikipedia/pagegenerators.py", line 904, in preload pywikibot.getall(site, pagesThisSite) File "/usr/home/masti/pw/pywikipedia/wikipedia.py", line 4037, in getall _GetAll(site, k, throttle, force).run() File "/usr/home/masti/pw/pywikipedia/wikipedia.py", line 3689, in run self.oneDoneApi(vals) File "/usr/home/masti/pw/pywikipedia/wikipedia.py", line 3913, in oneDoneApi page2._userName = username UnboundLocalError: local variable 'username' referenced before assignment local variable 'username' referenced before assignment
I think all of this is generate due to the fact that when an exceptio occurs there is no action and the procedure contiunues without variables beein set. So the real problem is in line 3887: except KeyError: pass
I think instead of pass the procedure should return.
----------------------------------------------------------------------
Comment By: xqt (xqt)
Date: 2010-03-19 07:53
Message: fixed in r8019
----------------------------------------------------------------------
Comment By: xqt (xqt) Date: 2010-03-17 18:40
Message: I reverted r8011 reading pages on bulk via api for now until I found the reason why there is no revison found for a page.
----------------------------------------------------------------------
Comment By: masti (masti01) Date: 2010-03-15 20:49
Message: I've submitted a patch for that #2970823
star line for pl.wikipedia is: python weblinkchecker.py -talk -namespace:0 -start:"Lista obserwatoriĆ³w astronomicznych"
it crashed on this article.
----------------------------------------------------------------------
Comment By: xqt (xqt) Date: 2010-03-15 19:49
Message: you're right. Could you give me the command line you have used? I would like to examine the reason why this exception occurs. thx.
----------------------------------------------------------------------
You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2970545...
pywikipedia-bugs@lists.wikimedia.org