Bugs item #3514031, was opened at 2012-04-01 21:43
Message generated for change (Comment added) made by valhallasw
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3514031&group_…
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: login
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: hang after writting user-config.py
Initial Comment:
The cmd hang after writing user-config.py...I tested for both E or S.
As I tried version.py...It said no such file....
It seems to me the latest nightly version (at least for 31/3/2012-2/4/2012)didn\'t include version.py while the import used try such that no error given.
I find http://sourceforge.net/tracker/?func=detail&aid=2901369&group_id=93107&atid… for fixed and closed.
I reopen it since the problem still there.
----------------------------------------------------------------------
>Comment By: Merlijn S. van Deen (valhallasw)
Date: 2012-04-16 04:49
Message:
Fixed in r10119.
----------------------------------------------------------------------
Comment By: justincheng (justincheng)
Date: 2012-04-10 04:55
Message:
It seems related but not all.
The reason is this bug couldn't even log in and fall in a loop but 3516383
seems to be able to run and the problem is only displacing with unsupported
characters.
----------------------------------------------------------------------
Comment By: André Malafaya Baptista (malafaya)
Date: 2012-04-10 03:32
Message:
It seems to be related to transliteration/console. I just submitted a bug
regarding the break of the transliteration feature. Could this be related?
----------------------------------------------------------------------
Comment By: justincheng (justincheng)
Date: 2012-04-02 06:58
Message:
This should be a DUPLICATE of 3513968 but a few info can be found here.
https://sourceforge.net/tracker/index.php?func=detail&aid=3513968&group_id=…
----------------------------------------------------------------------
Comment By: justincheng (justincheng)
Date: 2012-04-02 06:33
Message:
For extend one -
family = 'wikipedia'
mylang = 'zh'
usernames['wikipedia']['zh'] = u'justincheng12345-bot'
log = ['interwiki']
interwiki_backlink = True
interwiki_shownew = True
interwiki_graph = False
interwiki_min_subjects = 100
interwiki_graph_formats = ['png']
interwiki_graph_url = None
without_interwiki = False
interwiki_contents_on_disk = False
sort_ignore_case = False
upload_to_commons = False
splitLongParagraphs = False
deIndentTables = True
table2wikiAskOnlyWarnings = True
table2wikiSkipWarnings = False
max_external_links = 50
report_dead_links_on_talk = False
db_hostname = 'localhost'
db_username = 'wikiuser'
db_password = ''
google_key = ''
google_api_refer = ''
yahoo_appid = ''
msn_appid = ''
flickr = {
'api_key': u'',
'review': False,
'reviewer': u'',
}
panoramio = {
'review': False,
'reviewer': u'',
}
proxy = {
'host': None,
'auth': None,
}
copyright_google = True
copyright_yahoo = True
copyright_msn = False
copyright_check_in_source_google = False
copyright_check_in_source_yahoo = False
copyright_check_in_source_msn = False
copyright_check_in_source_section_names = False
copyright_max_query_for_page = 25
copyright_skip_query = 0
copyright_connection_tries = 10
copyright_exceeded_in_queries = 2
copyright_exceeded_in_queries_sleep_hours = 6
copyright_show_date = True
copyright_show_length = True
copyright_economize_query = True
cosmetic_changes = False
cosmetic_changes_mylang_only = True
cosmetic_changes_enable = {}
cosmetic_changes_disable = {}
use_diskcache = False
retry_on_fail = True
actions_to_block = []
max_queue_size = 64
-------short one-----
family = 'wikipedia'
mylang = 'zh'
usernames['wikipedia']['zh'] = u'Justincheng12345-bot'
----------------------------------------------------------------------
Comment By: Merlijn S. van Deen (valhallasw)
Date: 2012-04-02 01:10
Message:
Could you post the contents of the generated user-config.py?
----------------------------------------------------------------------
Comment By: justincheng (justincheng)
Date: 2012-04-01 22:38
Message:
By Ctrl+C
I get
D:\Python27\pywikipedia>redirect.py
Traceback (most recent call last):
File "D:\Python27\pywikipedia\redirect.py", line 66, in <module>
import wikipedia as pywikibot
File "D:\Python27\pywikipedia\wikipedia.py", line 7866, in <module>
exec "import %s_interface as uiModule" % config.userinterface
File "<string>", line 1, in <module>
File "D:\Python27\pywikipedia\userinterfaces\terminal_interface.py", line
12,
in <module>
from terminal_interface_win32 import Win32UI as UI
File
"D:\Python27\pywikipedia\userinterfaces\terminal_interface_win32.py", lin
e 10, in <module>
import terminal_interface_base
File "D:\Python27\pywikipedia\userinterfaces\terminal_interface_base.py",
line
13, in <module>
transliterator =
transliteration.transliterator(config.console_encoding)
File "D:\Python27\pywikipedia\userinterfaces\transliteration.py", line
1663, i
n __init__
while value.encode(encoding, 'replace').decode(encoding) == "?" and
value in
self.trans:
KeyboardInterrupt
No matter How long I let it run, it just stuck there....
----------------------------------------------------------------------
Comment By: justincheng (justincheng)
Date: 2012-04-01 21:56
Message:
As an attachment:
I haven't type in any password...I dont have that chance and the cmd
hangs.
I found the version.py finally as shown at the previous comment.
As I reopen redirect.py again, it just hangs there....
----------------------------------------------------------------------
Comment By: justincheng (justincheng)
Date: 2012-04-01 21:51
Message:
I'm the reporter.
D:\Python27\pywikipedia>version.py
Pywikipedia [http] trunk/pywikipedia (r10075, 2012/04/01, 14:02:18)
Python 2.7 (r27:82525, Jul 4 2010, 09:01:59) [MSC v.1500 32 bit (Intel)]
config-settings:
use_api = True
use_api_login = True
unicode test: triggers problem #3081100
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3514031&group_…
Bugs item #3518421, was opened at 2012-04-16 04:31
Message generated for change (Comment added) made by valhallasw
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3518421&group_…
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: Duplicate
Priority: 5
Private: No
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: Hang in transliteration.py with IDLE under Mac OS
Initial Comment:
Since revision 10047 import wikipedia hangs infinitely in userinterfaces/transliteration.py when used from pythons IDLE in Mac OS X 10.6.8
Pywikipedia [http] trunk/pywikipedia (r10046, 2012/03/26, 08:10:48)
Python 2.7.2 (v2.7.2:8527427914a2, Jun 11 2011, 15:22:34)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)]
config-settings:
use_api = True
use_api_login = True
unicode test: ok
----------------------------------------------------------------------
>Comment By: Merlijn S. van Deen (valhallasw)
Date: 2012-04-16 04:34
Message:
duplicate of 3514031 /
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3514031&group_…
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3518421&group_…
Bugs item #3518421, was opened at 2012-04-16 04:31
Message generated for change (Tracker Item Submitted) made by nobody
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3518421&group_…
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: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: Hang in transliteration.py with IDLE under Mac OS
Initial Comment:
Since revision 10047 import wikipedia hangs infinitely in userinterfaces/transliteration.py when used from pythons IDLE in Mac OS X 10.6.8
Pywikipedia [http] trunk/pywikipedia (r10046, 2012/03/26, 08:10:48)
Python 2.7.2 (v2.7.2:8527427914a2, Jun 11 2011, 15:22:34)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)]
config-settings:
use_api = True
use_api_login = True
unicode test: ok
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3518421&group_…
Feature Requests item #3516383, was opened at 2012-04-10 03:26
Message generated for change (Comment added) made by valhallasw
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603141&aid=3516383&group_…
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
>Priority: 4
Private: No
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
>Summary: Support for transliteration in console output
Initial Comment:
Since some days/weeks ago, I can't get non-latin characters to be displayed in the Windows console. Usually, they would be transliterated and in yellow, but now I only see either question marks or blocks (if I use an Unicode font). There is an exception for Greek characters which are displayed correctly if I use an Unicode font. As of now, I can't confirm an interwiki link in Cyrilic simply because I can't see what text is in [[ru:????????]].
I use the cp850 encoding. Using cp65001 is not supported by Pywikipedia.
It would be great to get the transliteration feature back working. For instance, r9974 worked fine.
Comment on config.py:
############## USER INTERFACE SETTINGS ##############
# The encoding that's used in the user's console, i.e. how strings are encoded
# when they are read by raw_input(). On Windows systems' DOS box, this should
# be 'cp850' ('cp437' for older versions). Linux users might try 'iso-8859-1'
# or 'utf-8'.
# This default code should work fine, so you don't have to think about it.
# TODO: consider getting rid of this config variable.
Python 2.7.2 (default, Jun 12 2011, 14:24:46) [MSC v.1500 64 bit (AMD64)]
config-settings:
use_api = True
use_api_login = True
unicode test: ok
----------------------------------------------------------------------
>Comment By: Merlijn S. van Deen (valhallasw)
Date: 2012-04-16 03:41
Message:
I'm moving this to feature requests with a lower priority. In the current
setup, we output the correct characters, but your font is unable to
correctly render them. However, copying does work, and I think this is more
useful than transliterated characters.
Checking if an interwiki link is correct is not possible using
transliterations, but is possible by copy-pasting the unicode characters.
----------------------------------------------------------------------
Comment By: xqt (xqt)
Date: 2012-04-10 05:24
Message:
Try reverting r10048 of terminal_interface_base.py to the previous r10047.
I found it helps and gives the right transliterations. Could you verify?
----------------------------------------------------------------------
Comment By: André Malafaya Baptista (malafaya)
Date: 2012-04-10 04:30
Message:
Not really. Lucida Console doesn't show Cyrilic or Georgian or Arabic.
AFAICT, it only shows Latin and Greek.
It got better with DejaVu Sans Mono [check
http://stackoverflow.com/questions/878972/windows-cmd-encoding-change-cause…]
but I still see some unsupported characters showing up sometimes.
Is there a complete mono font out there (free)?
----------------------------------------------------------------------
Comment By: Bináris (binbot)
Date: 2012-04-10 03:31
Message:
Set your console character set to Consolas or Lucida instead of raster
fonts at the properties, and you will find it better than earlier. :-)
----------------------------------------------------------------------
Comment By: André Malafaya Baptista (malafaya)
Date: 2012-04-10 03:27
Message:
Sorry, that was me. I forgot to login.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603141&aid=3516383&group_…
Support Requests item #3513968, was opened at 2012-04-01 11:10
Message generated for change (Comment added) made by valhallasw
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603139&aid=3513968&group_…
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
Priority: 5
Private: No
Submitted By: YFdyh000 (yfdyh000)
Assigned to: Nobody/Anonymous (nobody)
Summary: Since the 10047, cannot run all scripts in Windows XP
Initial Comment:
version 10046 and a lower version are operating normally, the 10047 and later (until latest 10075) were unable to operate normally (except version.py outside), no echo, and enter an infinite loop, CPU occupancy rate of 100%.
----------------------------------------------------------------------
>Comment By: Merlijn S. van Deen (valhallasw)
Date: 2012-04-16 03:37
Message:
Duplicate of 3514031 & apparently fixed in 10075 if I understand your
message correctly?
----------------------------------------------------------------------
Comment By: justincheng (justincheng)
Date: 2012-04-02 06:55
Message:
I would say 3514031 is a DUPLICATE of this bug but some information can be
found there.
https://sourceforge.net/tracker/?func=detail&aid=3514031&group_id=93107&ati…
----------------------------------------------------------------------
Comment By: Merlijn S. van Deen (valhallasw)
Date: 2012-04-01 11:18
Message:
Please post your user_config.py.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603139&aid=3513968&group_…
Bugs item #3516904, was opened at 2012-04-11 09:23
Message generated for change (Comment added) made by warddr
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3516904&group_…
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: login
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Warddr (warddr)
Assigned to: Nobody/Anonymous (nobody)
Summary: password not remembered?
Initial Comment:
If I run login.py -all I get for every language:Should be logged in now
but every time I start a new robot command (like for example to move a category) it asks for my password again.
I also tried this on an ubuntu pc with python 2.7.2 but same result.
Here is my version.py:
Pywikipedia [http] trunk/pywikipedia (r10103, 2012/04/10, 07:18:22)
Python 2.6.6 (r266:84292, Dec 27 2010, 00:02:40)
[GCC 4.4.5]
config-settings:
use_api = True
use_api_login = True
----------------------------------------------------------------------
>Comment By: Warddr (warddr)
Date: 2012-04-16 03:10
Message:
It was the capital letter problem, it's fixed now.
Maybe a FR can be to show a warning when logging in if this problem is
triggered?
----------------------------------------------------------------------
Comment By: Merlijn S. van Deen (valhallasw)
Date: 2012-04-16 03:04
Message:
Please post your user-config.py. Specifically, check if your nickname
starts with a capital letter.
----------------------------------------------------------------------
Comment By: xqt (xqt)
Date: 2012-04-13 09:37
Message:
Could you try
login.py -all -force
please. This should delete old files and force login with new data.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3516904&group_…
Bugs item #3516904, was opened at 2012-04-11 09:23
Message generated for change (Settings changed) made by valhallasw
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3516904&group_…
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: login
Group: None
Status: Open
Resolution: None
>Priority: 5
Private: No
Submitted By: Warddr (warddr)
Assigned to: Nobody/Anonymous (nobody)
Summary: password not remembered?
Initial Comment:
If I run login.py -all I get for every language:Should be logged in now
but every time I start a new robot command (like for example to move a category) it asks for my password again.
I also tried this on an ubuntu pc with python 2.7.2 but same result.
Here is my version.py:
Pywikipedia [http] trunk/pywikipedia (r10103, 2012/04/10, 07:18:22)
Python 2.6.6 (r266:84292, Dec 27 2010, 00:02:40)
[GCC 4.4.5]
config-settings:
use_api = True
use_api_login = True
----------------------------------------------------------------------
>Comment By: Merlijn S. van Deen (valhallasw)
Date: 2012-04-16 03:04
Message:
Please post your user-config.py. Specifically, check if your nickname
starts with a capital letter.
----------------------------------------------------------------------
Comment By: xqt (xqt)
Date: 2012-04-13 09:37
Message:
Could you try
login.py -all -force
please. This should delete old files and force login with new data.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3516904&group_…
Bugs item #3516904, was opened at 2012-04-11 09:23
Message generated for change (Comment added) made by xqt
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3516904&group_…
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: login
Group: None
Status: Open
Resolution: None
Priority: 7
Private: No
Submitted By: Warddr (warddr)
Assigned to: Nobody/Anonymous (nobody)
Summary: password not remembered?
Initial Comment:
If I run login.py -all I get for every language:Should be logged in now
but every time I start a new robot command (like for example to move a category) it asks for my password again.
I also tried this on an ubuntu pc with python 2.7.2 but same result.
Here is my version.py:
Pywikipedia [http] trunk/pywikipedia (r10103, 2012/04/10, 07:18:22)
Python 2.6.6 (r266:84292, Dec 27 2010, 00:02:40)
[GCC 4.4.5]
config-settings:
use_api = True
use_api_login = True
----------------------------------------------------------------------
>Comment By: xqt (xqt)
Date: 2012-04-13 09:37
Message:
Could you try
login.py -all -force
please. This should delete old files and force login with new data.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3516904&group_…
Support Requests item #3019475, was opened at 2010-06-22 01:59
Message generated for change (Comment added) made by
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603139&aid=3019475&group_…
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: Install Problem
Group: None
Status: Closed
Priority: 5
Private: No
Submitted By: https://www.google.com/accounts ()
Assigned to: Nobody/Anonymous (nobody)
Summary: No JSON object could be decoded [FIXED]
Initial Comment:
On Ubuntu 10.04, Karmic LAMP (PHP 5.2) Python 2.6.5, pywikipediabot from 2010-05-29 SVN, using identical server and bot configuration files as on a Mac setup (however, in this case, pywikipediabot reports an IP address, so I didn't need to hack httpd.conf), I get the following:
"Logging into FamilyName:en as UserName via API
Error downloading data: No JSON object could be decoded
Request en:/scriptpath/api.php?
Retrying in x seconds
I changed this to milliseconds to timely see the final error message, which is:
ERROR: ApiGetDataParse cause error No JSON object could be decoded
The program also creates a dump file containing the following:
Error reported: No JSON object could be decoded
127.0.0.1
/scriptpath/api.php?
<feff>{"login":{"result":"NeedToken","token":"[some md5-looking hash]"}}
Any ideas?
----------------------------------------------------------------------
Comment By: https://www.google.com/accounts ()
Date: 2012-04-13 01:34
Message:
Just to share :
I got the issue too. The UTF-16 BOM was inserted in LocalSettings.php
(edited by a MS Windows user).
I removed it and now everything works fine.
----------------------------------------------------------------------
Comment By: https://www.google.com/accounts ()
Date: 2010-08-05 23:05
Message:
Finally!!!! The problem is that DynamicPageList extension had BOMs at the
beginning of its initialization file. Because this is a "require_once"
extension, it seems that the BOM was getting inserted into the headers, and
Ubuntu's version of PHP or Apache (not sure which) does not sanitize those,
whereas the Mac (and seemingly, everyone else's installation) DOES sanitize
the BOMs before parsing. I am not sure why BeautifulSoup.py doesn't catch
this, but for whatever reason it doesn't. Unless you're using UTF-16 files,
you really shouldn't have a BOM anyway...
To check if you have any stray BOM's laying around, Mediawiki has actually
included a handy script in the t/maint directory called "bom.t"
If you're curious, go to your main MediaWiki directory, then "perl
t/maint/bom.t", and it will tell you which files are problematic.
If you just want to blast away and fix the problem, a combination of two
handy scripts took care of the problem for me. Put one or both in an
executable path, but be sure modify the shell script to refer to the
absolute path to the Perl script:
This one I call "RecursiveBOMDefuse.sh"
#!/bin/sh
#
if [ "$1" = "" ] ; then
echo "Usage: $0 directory"
exit
fi
# Get list of files in the directory
find "$1" -type f |
while read Name ; do
# Based on the file name, perform the conversion
case "$Name" in
(*) # markup text
NameTxt="${Name}"
/absolute/path/to/./BOMdefuse.plx "$NameTxt";
#alternatively, you could use perl /absolute/path/to/BOMdefuse.plx
"$NameTxt";
;;
esac
done
The next, I call BOMdefuse.plx, which is a perl script I found at W3C's
website - I'm really not sure why they haven't made this operate
recursively, but the shell takes care of that. If I had the time, I'd fix
the Perl script to handle everything, but I'm just so happy about getting
the bot working again that I'm going back to work on editing/cleaning up
content.
#!/usr/bin/perl
# program to remove a leading UTF-8 BOM from a file
# works both STDIN -> STDOUT and on the spot (with filename as argument)
# from http://people.w3.org/rishida/blog/?p=102
#
if ($#ARGV > 0) {
print STDERR "Too many arguments!\n";
exit;
}
my @file; # file content
my $lineno = 0;
my $filename = @ARGV[0];
if ($filename) {
open( BOMFILE, $filename ) || die "Could not open source file for
reading.";
while (<BOMFILE>) {
if ($lineno++ == 0) {
if ( index( $_, '' ) == 0 ) {
s/^\xEF\xBB\xBF//;
print "BOM found and removed.\n";
}
else { print "No BOM found.\n"; }
}
push @file, $_ ;
}
close (BOMFILE) || die "Can't close source file after reading.";
open (NOBOMFILE, ">$filename") || die "Could not open source file for
writing.";
foreach $line (@file) {
print NOBOMFILE $line;
}
close (NOBOMFILE) || die "Can't close source file after writing.";
}
else { # STDIN -> STDOUT
while (<>) {
if (!$lineno++) {
s/^\xEF\xBB\xBF//;
}
push @file, $_ ;
}
foreach $line (@file) {
print $line;
}
}
Obviously, run a chmod +x on both of these.
then go to your main Mediawiki directory and run "RecursiveBOMDefuse.sh ."
- it may take a minute or two, but it works!
Note: If you use symlinks anywhere in your installation, the script above
does not seem to follow them, so you have to run the script from the actual
directory. Although slightly annoying, this is probably a good thing, as a
bed set of symlinks could send this script off to run through your entire
drive (or if you're on a system with NFS mounts, the whole
network/cluster!!!).
I hope this helps others, and Ubuntu or Pywikipediabot folks, please take a
look at your PHP/Apache and BeautifulSoup.py - stray BOMs should not be
getting through..... (Of course, extension authors should sanitize their
extensions first, but talk about herding cats).
-Alex
----------------------------------------------------------------------
Comment By: https://www.google.com/accounts ()
Date: 2010-06-29 08:01
Message:
Still doesn't work with
Pywikipediabot (r8335 (wikipedia.py), 2010/06/26, 10:07:01)
Python 2.6.5 (r265:79063, Apr 16 2010, 13:09:56)
[GCC 4.4.3]
(or python 2.5.4)
----------------------------------------------------------------------
Comment By: https://www.google.com/accounts ()
Date: 2010-06-22 10:21
Message:
Thanks for the suggestions and thanks for taking a look.
I'm using the stock 3321-byte api.php from MediaWiki 1.15.4, downloaded
straight from mediawiki.org, dated 2009-05-05 (extracted from the tarball
via tar zxf). I am using a default (apt-get) install of python 2.6.4 on a
fresh install of Ubuntu 10.04, and I just checked out the latest
pywikipediabot from svn via svn co
http://svn.wikimedia.org/svnroot/pywikipedia/trunk/pywikipedia pywikipedia
several hours ago. I've disabled the confusing mess that is AppArmor, so
there should be no issues there. My terminal is set to UTF-8 encoding.
I get the same problem with python 2.5.4 (e.g., "python2.5 login.py"), but
only on this particular machine.
I have made no changes to urllib2, which is what login.py imports by
default, and I have made no changes to urllib, which is what a default
family file imports.
The family file I am using was created on a Mac in vim. As far as I know,
vim doesn't add UTF-16 BOMs unless explicitly asked to do so, and I have
not explicitly done that. Just in case, on the linux box, I created a new
file and copy-pasted the family file text into it, renamed the old one,
renamed the new one properly, deleted all .pyc files, and I still get this
error. I have changed urllib2 to urllib and vice versa in each, both, and
neither of login.py and the family file, all with the same result.
Here is some more error output, although I am not sure if it helps:
ERROR: ApiGetDataParse caused error No JSON object could be decoded
127.0.0.1
/scriptpath/api.php?. Dump
ApiGetDataParse_FamilyName_en__Tue_Jun_22_18-54-23_2010.dump created.
Traceback (most recent call last):
File "login.py", line 437, in <module>
main()
File "login.py", line 433, in main
loginMan.login()
File "login.py", line 320, in login
cookiedata = self.getCookie(api)
File "login.py", line 182, in getCookie
response, data = query.GetData(predata, self.site, sysop=self.sysop,
back_response = True)
File "/home/user/bots/pywikipedia/query.py", line 170, in GetData
raise lastError
ValueError: No JSON object could be decoded
It looks like BeautifulSoup.py (starting at 1828) should strip out any
<feff> BOMs and replace them with null characters, but it doesn't seem to
be doing that.
I'm using completely stock installs of everything, straight from svn,
repositories, and official websites. My family file is built straight from
the template, and it is identical to the one that works on the Mac and on
an Ubuntu 8.04 install of the same wiki.
I have tried
python login.py -v -clean
and I get the following when viewing the dumpfile via cat:
Error reported: No JSON object could be decoded
127.0.0.1
/hcrscript/api.php?action=logout&format=json
[]
and this, when viewing the dumpfile in vim:
Error reported: No JSON object could be decoded
127.0.0.1
/hcrscript/api.php?action=logout&format=json
<feff>[]
As for other potentially-relevant info, I am using short URLs via
httpd.conf aliases, but this should make no difference at all, as it works
on other systems running php 5.2 and apache 2.2.
alias /scriptpath /path/to/scriptpath
alias /wiki /path/to/scriptpath/index.php
I have /scriptpath set as as the scriptpath in my family file, and my
api.php call is to '%s/api.php' (I have also tried u'%s/api.php' to try to
get BeautifulSoup to convert any errant unicode - I still get the identical
errors).
My syslog and /var/log/messages show no errors, and apache reports "POST
/hcrscript/api.php HTTP/1.1" 200".
I've tried uncommenting the "raise NotImplementedError" line in my family
file and commenting out use_api_login = True in my user-config.py file (or
leaving it as-is), but this just returns:
API disabled because this site does not support.
Retrying by ordinary way...
Logging in to Wiki:en as UserName
Login failed. Wrong password or CAPTCHA answer?
I'm completely stumped.
Thanks for any suggestions/advice you may have....
----------------------------------------------------------------------
Comment By: Merlijn S. van Deen (valhallasw)
Date: 2010-06-22 02:59
Message:
The <feff> is a UTF-16 BOM. Either urllib was changed, or you made some
change to api.php, accidentally adding it. Could you double-check if your
api.php is unchanged from the original mediawiki files (in other words:
replace it with an orginal from SVN/release)?
----------------------------------------------------------------------
Comment By: https://www.google.com/accounts ()
Date: 2010-06-22 02:06
Message:
Looking at some earlier logs, I see that this problem first appeared when I
upgraded from Python 2.6.1 to 2.6.2 in May. I am surprised that I seem to
be the only person having this problem.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603139&aid=3019475&group_…