Xqt created this task.
Xqt added a project: Pywikibot-tests.
Restricted Application added subscribers: pywikibot-bugs-list, Aklapper.
Restricted Application added a project: Pywikibot.
TASK DESCRIPTION
foreach ($list as $item) {_________________
NonStandardVersionSiteTestCase.test_arabeyes _________________
self = <tests.site_detect_tests.NonStandardVersionSiteTestCase
testMethod=test_arabeyes>
def test_arabeyes(self):
"""Test detection of MediaWiki sites for wiki.arabeyes.org."""
> self.assertSite('http://wiki.arabeyes.org/$1')
tests/site_detect_tests.py:106:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _
tests/site_detect_tests.py:42: in assertSite
self.assertIsInstance(MWSite(url), MWSite)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _
self = MWSite("http://wiki.arabeyes.org/")
fromurl = 'http://wiki.arabeyes.org/'
def __init__(self, fromurl):
"""
Initializer.
@raises pywikibot.exceptions.ServerError: a server error occurred
while loading the site
@raises Timeout: a timeout occurred while loading the site
@raises RuntimeError: Version not found or version less than 1.14
"""
if fromurl.endswith('$1'):
fromurl = fromurl[:-2]
r = fetch(fromurl)
check_response(r)
if fromurl != r.data.url:
pywikibot.log('{0} redirected to {1}'.format(fromurl,
r.data.url))
fromurl = r.data.url
self.fromurl = fromurl
data = r.text
wp = WikiHTMLPageParser(fromurl)
wp.feed(data)
self.version = wp.version
self.server = wp.server
self.scriptpath = wp.scriptpath
self.articlepath = None
try:
self._parse_pre_117(data)
except Exception as e:
pywikibot.log('MW pre-1.17 detection failed: {0!r}'.format(e))
if self.api:
try:
self._parse_post_117()
except (ServerError, RequestException):
raise
except Exception as e:
pywikibot.log('MW 1.17+ detection failed: {0!r}'.format(e))
if not self.version:
self._fetch_old_version()
if not self.api:
> raise RuntimeError('Unsupported url: {0}'.format(self.fromurl))
E RuntimeError: Unsupported url: http://wiki.arabeyes.org/
pywikibot/site_detect.py:91: RuntimeError
------------------------------ Captured log call
-------------------------------
logging.py 109 VERBOSE wgEnableApi is not enabled in HTML
of http://wiki.arabeyes.org/
logging.py 109 VERBOSE MW pre-1.17 detection failed:
AttributeError("'NoneType' object has no attribute 'groups'",)
work_miracles($item);
}
TASK DETAIL
https://phabricator.wikimedia.org/T243707
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Xqt
Cc: Aklapper, Dvorapa, Xqt, pywikibot-bugs-list, Zkhalido, Viztor, Wenyi,
Tbscho, MayS, Mdupont, JJMC89, Altostratus, Avicennasis, mys_721tx, jayvdb,
Masti, Alchimista, Rxy
_______________________________________________
pywikibot-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs