[Pywikipedia-l] [ pywikipediabot-Bugs-1868451 ] checkimages.py's bugs

SourceForge.net noreply at sourceforge.net
Sun Jan 13 15:28:30 UTC 2008


Bugs item #1868451, was opened at 2008-01-10 21:45
Message generated for change (Comment added) made by lin4h
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: Open
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: Alex S.H. Lin (lin4h)
Date: 2008-01-13 23:28

Message:
Logged In: YES 
user_id=1902991
Originator: YES

Checked, It's work!.

----------------------------------------------------------------------

Comment By: Filnik (filnik)
Date: 2008-01-13 22: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 22: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 22: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 22: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 21: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 20: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