[Pywikipedia-l] [ pywikipediabot-Bugs-1868451 ] checkimages.py's bugs
SourceForge.net
noreply at sourceforge.net
Sun Jan 13 18:28:33 UTC 2008
Bugs item #1868451, was opened at 2008-01-10 13:45
Message generated for change (Comment added) made by filnik
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1868451&group_id=93107
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: None
Priority: 5
Private: No
Submitted By: Alex S.H. Lin (lin4h)
Assigned to: Filnik (filnik)
Summary: checkimages.py's bugs
Initial Comment:
Traceback (most recent call last):
File "D:\My Documents\SOURCE\mwbot\pywikipedia\checkimages.py", line 962, in <
module>
wikipedia.output(u"Waiting for %s seconds, %s" % (time_sleep, time.strftime(
"%d %b %Y %H:%M:%S (UTC)", time.localtime())))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xa4 in position 3: ordinal
not in range(128)
Checking project is jawiki.
And I just run this script is zhwiki, when it add a notice to uploader, it add ":" in the section.(http://zh.wikipedia.org/w/index.php?title=User_talk%3AAccler&diff=5990556&oldid=5990552)
----------------------------------------------------------------------
>Comment By: Filnik (filnik)
Date: 2008-01-13 18:28
Message:
Logged In: YES
user_id=1834469
Originator: NO
It was compatible only to python 2.5. I've changed it so you can use it
also with 2.4 (and older versions).
Bug closed ;-)
Bye, Filnik.
----------------------------------------------------------------------
Comment By: Alex S.H. Lin (lin4h)
Date: 2008-01-13 15:41
Message:
Logged In: YES
user_id=1902991
Originator: YES
Wait...I update the code to a remote server (use FreeBSD, python 2.4.4),
and it returen a Syntax Error.
>python checkimages.py
File "checkimages.py", line 1009
finally:
^
SyntaxError: invalid syntax
But it's not return any error in my Windows OS.
----------------------------------------------------------------------
Comment By: Alex S.H. Lin (lin4h)
Date: 2008-01-13 15:28
Message:
Logged In: YES
user_id=1902991
Originator: YES
Checked, It's work!.
----------------------------------------------------------------------
Comment By: Filnik (filnik)
Date: 2008-01-13 14:54
Message:
Logged In: YES
user_id=1834469
Originator: NO
Ok, Patch applied. I hope that know it works ;-) (if yes, write here that
I close the bug). Filnik
----------------------------------------------------------------------
Comment By: Alex S.H. Lin (lin4h)
Date: 2008-01-13 14:38
Message:
Logged In: YES
user_id=1902991
Originator: YES
Orz... Now the new bug is time string after check images.
Hsuhaojen.jpg seems ok,
'ascii' codec can't decode byte 0xa4 in position 3: ordinal not in
range(128)
And... I just copy the code from welcome.py and make a patch before your
commit.
I think the UnicodeDecodeError is my fault because I use Windows XP
Chinese Edition.From line 289 in r4864 , the month name %b will read
chinese month name (now is 一月), it is big5.so my OS cannot decode it by
utf-8
File Added: checkimages.py.patch
----------------------------------------------------------------------
Comment By: Filnik (filnik)
Date: 2008-01-13 14:13
Message:
Logged In: YES
user_id=1834469
Originator: NO
Now it should be fixed. By the way: The first bug is fixed (I've made the
Bot print the error but it won't crash) and the second is not my fault
(it's the standard function to get the HTML's text and it write the errors
but don't crash too). So it should work although it report these errors.
Can you please confirm? Filnik. P.S. I've a bit rewritten it so maybe the
first bug is totally solved and a few other feature should work a bit
better.
----------------------------------------------------------------------
Comment By: Filnik (filnik)
Date: 2008-01-13 14:12
Message:
Logged In: YES
user_id=1834469
Originator: NO
Now it should be fixed. By the way: The first bug is fixed (I've made the
Bot print the error but it won't crash) and the second is not my fault
(it's the standard function to get the HTML's text and it write the errors
but don't crash too). So it should work although it report these errors.
Can you please confirm? Filnik. P.S. I've a bit rewritten it so maybe the
first bug is totally solved and a few other feature should work a bit
better.
----------------------------------------------------------------------
Comment By: Alex S.H. Lin (lin4h)
Date: 2008-01-13 13:54
Message:
Logged In: YES
user_id=1902991
Originator: YES
It not solve the bug, and I think you forget to write the variable to line
967, it return:
'utf8' codec can't decode byte 0xa4 in position 3: unexpected code byte
Waiting for %s seconds
And line 796 has the same problem, too.It return error:
'utf8' codec can't decode bytes in position 52871-52873: invalid data
ERROR: Invalid characters found on
http://zh.wikipedia.org/w/index.php?title=Spe
cial:Log&type=upload&user=&page=&limit=80, replaced by \ufffd.
----------------------------------------------------------------------
Comment By: Filnik (filnik)
Date: 2008-01-12 12:23
Message:
Logged In: YES
user_id=1834469
Originator: NO
http://botwiki.sno.cc/w/index.php?title=Python%3ACheckimages.py&diff=4652&oldid=4651
<-- Fixed in this update (the new version is also in the svn system, you it
to update ;-)). Not sure for the encoding issue, but it should work (please
test it better on your pc. Sometimes there's difference between Linux and
Windows..) Filnik
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1868451&group_id=93107
More information about the Pywikipedia-l
mailing list