Bugs item #3080059, was opened at 2010-10-02 19:39 Message generated for change (Comment added) made by xqt You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3080059...
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: Accepted Priority: 5 Private: No Submitted By: MGA73 (mga73) Assigned to: xqt (xqt) Summary: NowCommons.py
Initial Comment: NowCommons.py gives me an error after replacing usage:
Traceback (most recent call last): File "C:\pywikipedia\nowcommons.py", line 359, in <module> main() File "C:\pywikipedia\nowcommons.py", line 355, in main bot.run() File "C:\pywikipedia\nowcommons.py", line 318, in run oImageRobot.run() File "C:\pywikipedia\image.py", line 137, in run case = re.escape(self.oldImage[0].upper() + \ IndexError: string index out of range
MGA73
----------------------------------------------------------------------
Comment By: xqt (xqt)
Date: 2010-10-08 18:23
Message: Ok, I've found the bug. Some of the images have a time stamp and this gives the mess. I'll fix it this weekend asap. Please wait patiently... (and sorry for this unapproved edit on en-wiki. I just typed your command line within the -replacealways :-)
----------------------------------------------------------------------
Comment By: xqt (xqt) Date: 2010-10-08 18:01
Message: Oh I see. This comes when -replaceloose is set. Just put the line import urllib to import this module.
But there is another bug replacing wrong file names: http://en.wikipedia.org/w/index.php?title=Forum_check&action=historysubm...
Did this script ever works?
----------------------------------------------------------------------
Comment By: MGA73 (mga73) Date: 2010-10-08 17:24
Message: Thank you for the fast response. I still get an error:
Traceback (most recent call last): File "C:\pywikipedia\nowcommons.py", line 409, in <module> main() File "C:\pywikipedia\nowcommons.py", line 405, in main bot.run() File "C:\pywikipedia\nowcommons.py", line 346, in run localImagePage.titleWithoutNamespace()), File "C:\pywikipedia\nowcommons.py", line 282, in urlname return urllib.quote(encodedTitle) NameError: global name 'urllib' is not defined
Perhaps it would be easier for you if you tested this command yourself:
nowcommons.py -replace -replacealways: -replaceloose -replaceonly -lang:en
and trying both "no" and "yes".
----------------------------------------------------------------------
Comment By: xqt (xqt) Date: 2010-10-06 08:12
Message: refixed in r8611
----------------------------------------------------------------------
Comment By: MGA73 (mga73) Date: 2010-10-05 19:08
Message: Thank you. Now I get this error:
Traceback (most recent call last): File "C:\pywikipedia\nowcommons.py", line 409, in <module> main() File "C:\pywikipedia\nowcommons.py", line 405, in main bot.run() File "C:\pywikipedia\nowcommons.py", line 346, in run localImagePage.titleWithoutNamespace()), TypeError: urlname() takes exactly 1 argument (2 given)
----------------------------------------------------------------------
Comment By: xqt (xqt) Date: 2010-10-04 23:01
Message: fixd in r8606, Please check it.
----------------------------------------------------------------------
Comment By: MGA73 (mga73) Date: 2010-10-02 19:42
Message: __version__ = '$Id: nowcommons.py 8406 2010-08-17 17:09:03Z amir $'
----------------------------------------------------------------------
You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3080059...
pywikipedia-bugs@lists.wikimedia.org