Last modified: 2013-05-07 07:38:18 UTC
When running a newsletter delivery bot on http://en.wikipedia.beta.wmflabs.org/ (when testing), I recieve the error: (also see the attachment) Traceback (most recent call last): File "single-wiki-delivery-bot.py", line 197, in <module> change_status('Running') File "single-wiki-delivery-bot.py", line 35, in change_status status_page_obj.edit(status_message, summary='[[WP:BOT|Bot]]: Updated status File "/home/riley/wikitools/wikitools/page.py", line 538, in edit result = req.query() File "/home/riley/wikitools/wikitools/api.py", line 143, in query raise APIError(data['error']['code'], data['error']['info']) wikitools.api.APIError: (u'internal_api_error_MWException', u'Exception Caught: I get this when running on Windows 7 and linux. Script I was running: https://github.com/RileyHuntley/delivery-bots/blob/master/single-wiki-delivery-bot.py
Created attachment 12199 [details] Screenshot of output
--- $ python Python 2.7.2 (default, Oct 11 2012, 20:14:37) [GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import wikitools >>> w = wikitools.Wiki('http://en.wikipedia.beta.wmflabs.org/w/api.php') >>> w.login('M', 'h') True >>> p = wikitools.Page(w, 'Test') >>> p.edit('test') Traceback (most recent call last): File "<stdin>", line 1, in <module> File "build/bdist.macosx-10.8-intel/egg/wikitools/page.py", line 538, in edit File "build/bdist.macosx-10.8-intel/egg/wikitools/api.py", line 143, in query wikitools.api.APIError: (u'internal_api_error_MWException', u'Exception Caught: Unable to connect to redis server.') --- Though it seems to be intermittent. When re-testing, I was able to succesfully edit: --- >>> p.edit('test') {u'edit': {u'nochange': u'', u'contentmodel': u'wikitext', u'pageid': 6401, u'result': u'Success', u'title': u'Test'}} >>> p.edit('test2') {u'edit': {u'pageid': 6401, u'title': u'Test', u'newtimestamp': u'2013-04-28T23:30:10Z', u'contentmodel': u'wikitext', u'result': u'Success', u'oldrevid': 56971, u'newrevid': 56972}} >>> p.edit('test3') {u'edit': {u'pageid': 6401, u'title': u'Test', u'newtimestamp': u'2013-04-28T23:30:17Z', u'contentmodel': u'wikitext', u'result': u'Success', u'oldrevid': 56972, u'newrevid': 56973}} --- "Exception Caught: Unable to connect to redis server." <-- Is there a log of these exceptions?
(In reply to comment #2) > "Exception Caught: Unable to connect to redis server." <-- Is there a log of > these exceptions? AFAIK labs isn't using redis currently..
(In reply to comment #3) > (In reply to comment #2) > > "Exception Caught: Unable to connect to redis server." <-- Is there a log of > > these exceptions? > > AFAIK labs isn't using redis currently.. // Cache to hold user sessions in production: $wgObjectCaches['sessions'] = array( 'class' => 'RedisBagOStuff', 'servers' => $sessionRedis[$wmfDatacenter], ); // Override for beta: if( $wmfRealm == 'labs' ) { $wgObjectCaches['sessions'] = $wgObjectCaches['memcached-pecl']; }
Might be caused by one of the extension or another part of the mediawiki configuration. Do you still encounter the issue?
I can't reproduce it now.
So it has been fixed somehow.