https://bugzilla.wikimedia.org/show_bug.cgi?id=68153
Bug ID: 68153
Summary: blockpageschecker.py fails on English Wikipedia
Product: Pywikibot
Version: core (2.0)
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: Unprioritized
Component: General
Assignee: Pywikipedia-bugs(a)lists.wikimedia.org
Reporter: jayvdb(a)gmail.com
Web browser: ---
Mobile Platform: ---
Firstly, categoryToCheck is set to [[Category:Protected]] which is wrong.
When categoryToCheck is set to [[Category:Wikipedia protected pages]], it gives
the following error because it has not been configured for English Wikipedia.
If blockpageschecker.py is run on
Loading [[OMICS Group]]...
Traceback (most recent call last):
File "pwb.py", line 153, in <module>
run_python_file(fn, argv, argvu)
File "pwb.py", line 67, in run_python_file
exec(compile(source, filename, "exec"), main_mod.__dict__)
File "scripts/blockpageschecker.py", line 498, in <module>
main()
File "scripts/blockpageschecker.py", line 336, in main
replaceToPerform = u'|'.join(TTP + TSP)
TypeError: unsupported operand type(s) for +: 'NoneType' and 'NoneType'
<type 'exceptions.TypeError'>
Support for English Wikipedia has been disabled since 2008 with this changeset,
as 'en' was set to None for all the other configuration fields.
https://mediawiki.org/wiki/Special:Code/pywikipedia/5246
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=55238
Web browser: ---
Bug ID: 55238
Summary: imagecopy_self.py replaces usage even if upload to C
fails
Product: Pywikibot
Version: unspecified
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: Unprioritized
Component: General
Assignee: Pywikipedia-bugs(a)lists.wikimedia.org
Reporter: legoktm.wikipedia(a)gmail.com
Classification: Unclassified
Mobile Platform: ---
Originally from: http://sourceforge.net/p/pywikipediabot/bugs/1332/
Reported by: mga73
Created on: 2011-08-23 17:25:13
Subject: imagecopy_self.py replaces usage even if upload to C fails
Original description:
If a file is moved to Commons with a new name imagecopy\_self.py replaces the
usage. That is good :-\)
However, I have 2 examples where usage was replaced even if file was not moved
to Commons.
1\) I made a typo in .jpg
http://en.wikipedia.org/w/index.php?title=Rashean\_Mathis&diff=438089781&ol…
2\) Filetype did not match .ext
http://ms.wikipedia.org/w/index.php?title=Sekolah\_Menengah\_Kebangsaan\_St…
So I suggest that replace is only done once the upload is verified.
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=72846
Bug ID: 72846
Summary: generate_family_file.py fails on wiki-en.genealogy.net
Product: Pywikibot
Version: core (2.0)
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: Unprioritized
Component: General
Assignee: Pywikipedia-bugs(a)lists.wikimedia.org
Reporter: jayvdb(a)gmail.com
Web browser: ---
Mobile Platform: ---
$ python ./generate_family_file.py http://wiki-en.genealogy.net/Main_Page gene
Generating family file from http://wiki-en.genealogy.net/Main_Pagehttp://wiki-en.genealogy.net/Main_Page
Traceback (most recent call last):
File "./generate_family_file.py", line 319, in <module>
FamilyFileGenerator(*sys.argv[1:]).run()
File "./generate_family_file.py", line 95, in run
w = Wiki(self.base_url)
File "./generate_family_file.py", line 242, in __init__
uo = urlopen(fromurl)
File "./generate_family_file.py", line 47, in urlopen
uo = urllib2.urlopen(req)
File "/usr/lib64/python2.7/urllib2.py", line 127, in urlopen
return _opener.open(url, data, timeout)
File "/usr/lib64/python2.7/urllib2.py", line 410, in open
response = meth(req, response)
File "/usr/lib64/python2.7/urllib2.py", line 523, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib64/python2.7/urllib2.py", line 448, in error
return self._call_chain(*args)
File "/usr/lib64/python2.7/urllib2.py", line 382, in _call_chain
result = func(*args)
File "/usr/lib64/python2.7/urllib2.py", line 531, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 504: Gateway Time-out
$ python ./generate_family_file.py http://wiki-en.genealogy.net/Main_Page gene
Generating family file from http://wiki-en.genealogy.net/Main_Pagehttp://wiki-en.genealogy.net/Main_Page
Traceback (most recent call last):
File "./generate_family_file.py", line 319, in <module>
FamilyFileGenerator(*sys.argv[1:]).run()
File "./generate_family_file.py", line 95, in run
w = Wiki(self.base_url)
File "./generate_family_file.py", line 242, in __init__
uo = urlopen(fromurl)
File "./generate_family_file.py", line 47, in urlopen
uo = urllib2.urlopen(req)
File "/usr/lib64/python2.7/urllib2.py", line 127, in urlopen
return _opener.open(url, data, timeout)
File "/usr/lib64/python2.7/urllib2.py", line 410, in open
response = meth(req, response)
File "/usr/lib64/python2.7/urllib2.py", line 523, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib64/python2.7/urllib2.py", line 448, in error
return self._call_chain(*args)
File "/usr/lib64/python2.7/urllib2.py", line 382, in _call_chain
result = func(*args)
File "/usr/lib64/python2.7/urllib2.py", line 531, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 504: Gateway Time-out
It works a bit better on wiki-de.genealogy.net
$ python ./generate_family_file.py http://wiki-de.genealogy.net/Main_Page gene
Generating family file from http://wiki-de.genealogy.net/Main_Pagehttp://wiki-de.genealogy.net/Main_Page
==================================
api url: http://wiki-de.genealogy.net/w/api.php
MediaWiki version: 1.14.1
==================================
Determining other
languages...http://wiki-de.genealogy.net/w/api.php?action=query&meta=sitein…
de en nl sv
There are 4 languages available.
Do you want to generate interwiki links? This might take a long time.
([y]es/[N]o/[e]dit)y
Loading wikis...
* de... in cache
* en... http://wiki-en.genealogy.net/
HTTP Error 504: Gateway Time-out
* nl... http://wiki-nl.genealogy.net/wiki/
downloaded
* sv... http://wiki-sv.genealogy.net/
HTTP Error 500: Internal Server Error
Writing pywikibot/families/gene_family.py...
The resulting family file only includes nl and de
# -*- coding: utf-8 -*-
"""
This family file was auto-generated by $Id:
185033971c163ea46b2b1904773b8c407069a4d0 $
Configuration parameters:
url = http://wiki-de.genealogy.net/Main_Page
name = gene
Please do not commit this to the Git repository!
"""
from pywikibot import family
class Family(family.Family):
def __init__(self):
family.Family.__init__(self)
self.name = 'gene'
self.langs = {
'nl': 'wiki-nl.genealogy.net',
'de': 'wiki-de.genealogy.net',
}
def scriptpath(self, code):
return {
'nl': '/w',
'de': '/w',
}[code]
def version(self, code):
return {
'nl': u'1.14.1',
'de': u'1.14.1',
}[code]
http://wiki-en.genealogy.net/w/api.php and
http://wiki-en.genealogy.net/w/api.php fail
http://wiki-sv.genealogy.net/w/api.php works for me
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=72871
Bug ID: 72871
Summary: Pywikibot requires siteinfo extensions, which is 1.14+
Product: Pywikibot
Version: core (2.0)
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: Unprioritized
Component: General
Assignee: Pywikipedia-bugs(a)lists.wikimedia.org
Reporter: jayvdb(a)gmail.com
Web browser: ---
Mobile Platform: ---
pywikibot requires siteinfo extensions in order to determine if AssertEdit is
available (only used for write API calls) and to test if Disambiguation
extension is available, which is used in core parts of Page (i.e. read
support). See especially.
https://gerrit.wikimedia.org/r/#/c/168084/2/pywikibot/site.py,cm
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=72749
Bug ID: 72749
Summary: API Warning for continue parameter
Product: Pywikibot
Version: unspecified
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: Unprioritized
Component: General
Assignee: Pywikipedia-bugs(a)lists.wikimedia.org
Reporter: info(a)gno.de
Web browser: ---
Mobile Platform: ---
WARNING: API warning (query): Formatting of continuation data will be changing
s
oon. To continue using the current formatting, use the 'rawcontinue' parameter.
To begin using the new format, pass an empty string for 'continue' in the
initia
l query.
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=72863
Bug ID: 72863
Summary: add coverage report to tests
Product: Pywikibot
Version: core (2.0)
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: Unprioritized
Component: tests
Assignee: Pywikipedia-bugs(a)lists.wikimedia.org
Reporter: jayvdb(a)gmail.com
Web browser: ---
Mobile Platform: ---
We should track what percentage of the codebase is being tested, probably on
travis and maybe sending the logs to http://coveralls.io
coverage works:
$ coverage-2.7 run --source=pywikibot setup.py test
http://nose.readthedocs.org/en/latest/plugins/cover.html also works:
$ nosetests --with-coverage --cover-package=pywikibot tests
I've uploaded our current coverage stats to
https://www.mediawiki.org/wiki/Manual:Pywikibot/Test_coverage
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=72861
Bug ID: 72861
Summary: test_archivebot_als stalled
Product: Pywikibot
Version: core (2.0)
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: Unprioritized
Component: network
Assignee: Pywikipedia-bugs(a)lists.wikimedia.org
Reporter: jayvdb(a)gmail.com
Web browser: ---
Mobile Platform: ---
Travis build stalled on test_archivebot_als
https://travis-ci.org/wikimedia/pywikibot-core/jobs/39680240
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=72860
Bug ID: 72860
Summary: KeyError in Siteinfo when network errors are occurring
Product: Pywikibot
Version: core (2.0)
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: Unprioritized
Component: network
Assignee: Pywikipedia-bugs(a)lists.wikimedia.org
Reporter: jayvdb(a)gmail.com
Web browser: ---
Mobile Platform: ---
An example
ERROR: test_fully_qualified_NS1_family
(tests.link_tests.TestFullyQualifiedNoLangFamilyExplicitLinkParser)
Test ':wikidata:testwiki:Talk:Q6' on enwp is namespace 1.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/travis/build/wikimedia/pywikibot-core/tests/link_tests.py", line
372, in test_fully_qualified_NS1_family
link.parse()
File "/home/travis/build/wikimedia/pywikibot-core/pywikibot/page.py", line
4154, in parse
if hasattr(self._site.namespaces()[self._namespace], 'case'):
KeyError: 0
Many more here:
https://travis-ci.org/wikimedia/pywikibot-core/jobs/39676782
And I'm quite confident there was another build in the last few weeks which has
done this.
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=72603
Bug ID: 72603
Summary: 'Maximum retries' api.py exception is not Python 3
compatible
Product: Pywikibot
Version: core (2.0)
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: Unprioritized
Component: network
Assignee: Pywikipedia-bugs(a)lists.wikimedia.org
Reporter: jayvdb(a)gmail.com
Web browser: ---
Mobile Platform: ---
In this py3 build, there are some network issues, and py3 exception handling
shows three exceptions, including json decoding exceptions. The result is
confusing to someone unfamiliar with py3 or not intimately aware of how the
api.py request error handling is organised.
https://travis-ci.org/wikimedia/pywikibot-core/jobs/39178815
======================================================================
ERROR: testLinkMethods (tests.site_tests.TestSiteObject)
Test site methods for getting links to and from a page.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/opt/python/3.3.5/lib/python3.3/json/decoder.py", line 367, in
raw_decode
obj, end = self.scan_once(s, idx)
StopIteration
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/travis/build/wikimedia/pywikibot-core/pywikibot/data/api.py",
line 606, in submit
result = json.loads(rawdata)
File "/opt/python/3.3.5/lib/python3.3/json/__init__.py", line 316, in loads
return _default_decoder.decode(s)
File "/opt/python/3.3.5/lib/python3.3/json/decoder.py", line 351, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/opt/python/3.3.5/lib/python3.3/json/decoder.py", line 369, in
raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/travis/build/wikimedia/pywikibot-core/tests/site_tests.py", line
331, in testLinkMethods
filterRedirects=False))
File "/home/travis/build/wikimedia/pywikibot-core/pywikibot/site.py", line
2582, in pagebacklinks
content=content
File "/home/travis/build/wikimedia/pywikibot-core/pywikibot/site.py", line
2568, in pagebacklinks
for redir in redirgen:
File "/home/travis/build/wikimedia/pywikibot-core/pywikibot/data/api.py",
line 1095, in __iter__
self.data = self.request.submit()
File "/home/travis/build/wikimedia/pywikibot-core/pywikibot/data/api.py",
line 828, in submit
self._data = super(CachedRequest, self).submit()
File "/home/travis/build/wikimedia/pywikibot-core/pywikibot/data/api.py",
line 624, in submit
self.wait()
File "/home/travis/build/wikimedia/pywikibot-core/pywikibot/data/api.py",
line 711, in wait
raise TimeoutError("Maximum retries attempted without success.")
pywikibot.data.api.TimeoutError: Maximum retries attempted without success.
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=72850
Bug ID: 72850
Summary: MediaWiki 1.14.x and 1.15.x respond with DBQueryError
to allusers with group parameter and auprop=groups
Product: Pywikibot
Version: core (2.0)
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: Unprioritized
Component: General
Assignee: Pywikipedia-bugs(a)lists.wikimedia.org
Reporter: jayvdb(a)gmail.com
Web browser: ---
Mobile Platform: ---
e.g. this fails
http://physics.lbl.gov/NuclearEnergy/api.php?action=query&list=allusers&aug…
API response received:
{"error":{"code":"internal_api_error_DBQueryError","info":"Database query
error","*":""}}
but this succeeds:
http://physics.lbl.gov/NuclearEnergy/api.php?action=query&list=allusers&aug…
by default pywikibot requests auprop=groups, causing tests to fail on wiki
1.12-1.15 at least ; MW fixed in 1.16.
More info on the error from 1.12.4
http://rnf.fisica.org.ar/api.php?action=query&list=allusers&augroup=bot&for…
{"error":{"code":"internal_api_error_DBUnexpectedError","info":"Exception
Caught: A database error has occurred\nQuery: SELECT ug2.ug_group
ug_group2,user_registration,user_name,user_editcount FROM mwuser INNER JOIN
user_groups ug1 ON ug1.ug_user=user_id LEFT JOIN user_groups ug2 ON
ug2.ug_user=user_id WHERE (user_name >= '!') AND (user_name LIKE \"D%\") AND
ug1.ug_group = 'bot' ORDER BY user_name LIMIT 14 \nFunction:
ApiQueryAllUsers::execute\nError: 1 ERROR: column \"D%\" does not exist\nLINE
1: ..._id WHERE (user_name >= '!') AND (user_name LIKE \"D%\") AND ...\n
^\n","*":"\n\n#0
\/home\/afa\/webapps\/rnf_wiki\/includes\/Database.php(799):
DatabasePostgres->reportQueryError('ERROR: column ...', 1, 'SELECT
ug2.ug_...', 'ApiQueryAllUser...', false)\n#1
\/home\/afa\/webapps\/rnf_wiki\/includes\/Database.php(1244):
Database->query('SELECT ug2.ug_...', 'ApiQueryAllUser...')\n#2
\/home\/afa\/webapps\/rnf_wiki\/includes\/api\/ApiQueryBase.php(131):
Database->select(Array, Array, Array, 'ApiQueryAllUser...', Array)\n#3
\/home\/afa\/webapps\/rnf_wiki\/includes\/api\/ApiQueryAllUsers.php(96):
ApiQueryBase->select('ApiQueryAllUser...')\n#4
\/home\/afa\/webapps\/rnf_wiki\/includes\/api\/ApiQuery.php(209):
ApiQueryAllUsers->execute()\n#5
\/home\/afa\/webapps\/rnf_wiki\/includes\/api\/ApiMain.php(355):
ApiQuery->execute()\n#6
\/home\/afa\/webapps\/rnf_wiki\/includes\/api\/ApiMain.php(223):
ApiMain->executeAction()\n#7
\/home\/afa\/webapps\/rnf_wiki\/includes\/api\/ApiMain.php(208):
ApiMain->executeActionWithErrorHandling()\n#8
\/home\/afa\/webapps\/rnf_wiki\/api.php(77): ApiMain->execute()\n#9
{main}\n\n"}}
Strangely, another 1.12.4 site doesnt error:
https://wiki.umsl.edu/vcities/api.php?action=query&list=allusers&augroup=sy…
1.11 has a different problem, in that it doesnt recognise the 'registration'
auprop.
http://glossary.reuters.com/api.php?action=query&list=allusers&augroup=syso…
--
You are receiving this mail because:
You are the assignee for the bug.