https://bugzilla.wikimedia.org/show_bug.cgi?id=58574
Web browser: ---
Bug ID: 58574
Summary: unicodeDecodeError in url2unicode()
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: info(a)gno.de
Classification: Unclassified
Mobile Platform: ---
Historia de Cerdeña -> corresponding page is Història de Sardenya
Traceback (most recent call last):
File "C:\pwb\core\pwb.py", line 135, in <module>
run_python_file(fn, argv, argvu)
File "C:\pwb\core\pwb.py", line 67, in run_python_file
exec(compile(source, filename, "exec"), main_mod.__dict__)
File "C:\pwb\core\scripts\featured.py", line 683, in <module>
main()
File "C:\pwb\core\scripts\featured.py", line 676, in main
bot.run()
File "C:\pwb\core\scripts\featured.py", line 285, in run
self.run_good()
File "C:\pwb\core\scripts\featured.py", line 320, in run_good
self.treat(code, task)
File "C:\pwb\core\scripts\featured.py", line 372, in treat
self.featuredWithInterwiki(fromsite, process)
File "C:\pwb\core\scripts\featured.py", line 612, in featuredWithInterwiki
atrans.put(text, comment)
File "C:\pwb\core\pywikibot\page.py", line 906, in put
async=async, callback=callback, **kwargs)
File "C:\pwb\core\pywikibot\page.py", line 827, in save
**kwargs)
File "C:\pwb\core\pywikibot\page.py", line 834, in _save
comment = self._cosmetic_changes_hook(comment) or comment
File "C:\pwb\core\pywikibot\page.py", line 884, in _cosmetic_changes_hook
self.text = ccToolkit.change(old)
File "C:\pwb\core\scripts\cosmetic_changes.py", line 174, in change
text = self.cleanUpLinks(text)
File "C:\pwb\core\scripts\cosmetic_changes.py", line 510, in cleanUpLinks
'startspace'])
File "C:\pwb\core\pywikibot\textlib.py", line 208, in replaceExcept
replacement = new(match)
File "C:\pwb\core\scripts\cosmetic_changes.py", line 396, in handleOneLink
if not self.site.isInterwikiLink(titleWithSection):
File "C:\pwb\core\pywikibot\site.py", line 381, in isInterwikiLink
linkfam, linkcode = pywikibot.Link(text, self).parse_site()
File "C:\pwb\core\pywikibot\page.py", line 3102, in __init__
t = url2unicode(t, site=self._source)
File "C:\pwb\core\pywikibot\page.py", line 3546, in url2unicode
raise firstException
UnicodeDecodeError: 'utf8' codec can't decode byte 0x80 in position 12: invalid
start byte
Unfortunately the title is not printed to specify that bug
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=55017
Web browser: ---
Bug ID: 55017
Summary: category.py dosen't work properly for template
namespace
Product: Pywikibot
Version: unspecified
Hardware: All
OS: All
Status: NEW
Severity: enhancement
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/feature-requests/329/
Reported by: reza1615
Created on: 2013-01-31 20:21:16
Subject: category.py dosen't work properly for template namespace
Original description:
category.py doesn't work properly for template namespace and it don't remove or
change categories from /doc sub-page
please add some codes to check if category is not in the template page it goes
to /doc page
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=65311
Maarten Dammers <maarten(a)mdammers.nl> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |WORKSFORME
--- Comment #4 from Maarten Dammers <maarten(a)mdammers.nl> ---
Nevermind, ran the wrong version:
>python2.7 pwb.py newitem.py -lang:nl -newpages
Page age is set to 21 days so only pages created
before 2014-10-01T18:13:15 will be considered.
Last edit is set to 7 days so only pages last edited
before 2014-10-15T18:13:16 will be considered.
Retrieving 50 pages from wikipedia:nl.
Working on u'Aanvangsstabiliteit'
Last edit on [[nl:Aanvangsstabiliteit]] was on 2014-10-22T17:34:46.
Too recent. Skipping.
[[nl:Abbas Bahri]] already has an item: [[wikidata:Q305866]].
[[nl:Abdij Mariawald]] already has an item: [[wikidata:Q334026]].
[[nl:Anything Goes (1936)]] already has an item: [[wikidata:Q2743992]].
Working on u'Audiotricz'
Last edit on [[nl:Audiotricz]] was on 2014-10-22T17:46:47.
Too recent. Skipping.
[[nl:Batrachedra]] already has an item: [[wikidata:Q146795]].
[[nl:Goodall]] already has an item: [[wikidata:Q418363]].
(etc etc etc)
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=65311
Maarten Dammers <maarten(a)mdammers.nl> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |maarten(a)mdammers.nl
--- Comment #3 from Maarten Dammers <maarten(a)mdammers.nl> ---
>pwb.py newitem.py -lang:nl -newpages
Page age is set to 21 days so only pages created
before 2014-10-01T18:33:46 will be considered.
Last edit is set to 7 days so only pages last edited
before 2014-10-15T18:33:49 will be considered.
Retrieving 50 pages from wikipedia:nl.
>>> Aanvangsstabiliteit <<<
Traceback (most recent call last):
File "C:\pywikibot\coredev\pwb.py", line 164, in <module>
run_python_file(fn, argv, argvu)
File "C:\pywikibot\coredev\pwb.py", line 69, in run_python_file
exec(compile(source, filename, "exec"), main_mod.__dict__)
File "C:\pywikibot\coredev\scripts\newitem.py", line 141, in <module>
main()
File "C:\pywikibot\coredev\scripts\newitem.py", line 138, in main
bot.run()
File "C:\pywikibot\coredev\scripts\newitem.py", line 68, in run
item = pywikibot.ItemPage.fromPage(page)
File "C:\pywikibot\coredev\pywikibot\page.py", line 3156, in fromPage
raise pywikibot.NoPage(i)
pywikibot.exceptions.NoPage: Page [[wikidata:-1]] doesn't exist.
<class 'pywikibot.exceptions.NoPage'>
CRITICAL: Waiting for 1 network thread(s) to finish. Press ctrl-c to abort
Nice, -newpages works, but looks like the bot is completely broken
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=72369
Bug ID: 72369
Summary: Add Wikidata Category (wdcat) generator
Product: Pywikibot
Version: core (2.0)
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: Unprioritized
Component: Wikidata
Assignee: Pywikipedia-bugs(a)lists.wikimedia.org
Reporter: maarten(a)mdammers.nl
Web browser: ---
Mobile Platform: ---
It would be nice to have a generator where you give the id of a Wikidata item
about a category and the generator returns all the articles in the categories
in the different connected languages.
So for example it would work on https://www.wikidata.org/wiki/Q16742294
Yield all articles in
https://da.wikipedia.org/wiki/Kategori:Lokalt_billede,_men_intet_billede_p%…
, yield all articles in
https://fr.wikipedia.org/wiki/Cat%C3%A9gorie:Local_image_but_no_image_on_Wi…
, etc etc.
Open for suggestions about renaming or maybe make it more general (for example
also for transcluded templates or even recursive on categories).
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=72009
Bug ID: 72009
Summary: FC20 ships httplib2 0.7.7 causing endless SSL cert
fail loop on python3
Product: Pywikibot
Version: core (2.0)
Hardware: PC
OS: Linux
Status: NEW
Severity: major
Priority: Unprioritized
Component: network
Assignee: Pywikipedia-bugs(a)lists.wikimedia.org
Reporter: jayvdb(a)gmail.com
Web browser: ---
Mobile Platform: ---
IIRC, there is a problem with certificates in httplib2 pre-0.9 (bug 65189).
FC20 ships 0.7.7 on python2 and python3
$ rpm -qi python-httplib2
Name : python-httplib2
Version : 0.7.7
Release : 3.fc20
...
$ rpm -qi python3-httplib2
Name : python3-httplib2
Version : 0.7.7
Release : 3.fc20
...
On py2, the 0.7.7 package works correctly.
On py3, the following occurs running site_tests
On py2, all tests pass using 0.7.7. On python3, tests fail badly (using en.wp
as default site).
$ python3 pwb.py tests/site_tests.py
.../pywikibot/family.py:879: DeprecationWarning: imp.load_source() is
deprecated; use importlib.machinery.SourceFileLoader(name,
pathname).load_module() instead
myfamily = imp.load_source(fam, config.family_files[fam])
ERROR: Traceback (most recent call last):
File "/usr/lib/python3.3/site-packages/httplib2/__init__.py", line 992, in
_conn_request
response = conn.getresponse()
File "/usr/lib64/python3.3/http/client.py", line 1135, in getresponse
raise ResponseNotReady(self.__state)
http.client.ResponseNotReady: Idle
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File ".../pywikibot/data/api.py", line 517, in submit
headers=headers, body=body)
File ".../pywikibot/tools.py", line 367, in wrapper
return method(*__args, **__kw)
File ".../pywikibot/comms/http.py", line 258, in request
raise request.data
File ".../pywikibot/comms/threadedhttp.py", line 219, in request
max_redirects, connection_type
File "/usr/lib/python3.3/site-packages/httplib2/__init__.py", line 1272, in
request
(response, content) = self._request(conn, authority, uri, request_uri,
method, body, headers, redirections, cachekey)
File "/usr/lib/python3.3/site-packages/httplib2/__init__.py", line 1026, in
_request
(response, content) = self._conn_request(conn, request_uri, method, body,
headers)
File "/usr/lib/python3.3/site-packages/httplib2/__init__.py", line 999, in
_conn_request
conn.connect()
File "/usr/lib64/python3.3/http/client.py", line 1202, in connect
server_hostname=server_hostname)
File "/usr/lib64/python3.3/ssl.py", line 245, in wrap_socket
_context=self)
File "/usr/lib64/python3.3/ssl.py", line 345, in __init__
raise x
File "/usr/lib64/python3.3/ssl.py", line 341, in __init__
self.do_handshake()
File "/usr/lib64/python3.3/ssl.py", line 548, in do_handshake
self._sslobj.do_handshake()
ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed
(_ssl.c:547)
WARNING: Waiting 5 seconds before retrying.
ERROR: Traceback (most recent call last):
File "/usr/lib/python3.3/site-packages/httplib2/__init__.py", line 992, in
_conn_request
response = conn.getresponse()
File "/usr/lib64/python3.3/http/client.py", line 1135, in getresponse
raise ResponseNotReady(self.__state)
http.client.ResponseNotReady: Idle
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File ".../pywikibot/data/api.py", line 517, in submit
headers=headers, body=body)
File ".../pywikibot/tools.py", line 367, in wrapper
return method(*__args, **__kw)
File ".../pywikibot/comms/http.py", line 258, in request
raise request.data
File ".../pywikibot/comms/threadedhttp.py", line 219, in request
max_redirects, connection_type
File "/usr/lib/python3.3/site-packages/httplib2/__init__.py", line 1272, in
request
(response, content) = self._request(conn, authority, uri, request_uri,
method, body, headers, redirections, cachekey)
File "/usr/lib/python3.3/site-packages/httplib2/__init__.py", line 1026, in
_request
(response, content) = self._conn_request(conn, request_uri, method, body,
headers)
File "/usr/lib/python3.3/site-packages/httplib2/__init__.py", line 999, in
_conn_request
conn.connect()
File "/usr/lib64/python3.3/http/client.py", line 1202, in connect
server_hostname=server_hostname)
File "/usr/lib64/python3.3/ssl.py", line 245, in wrap_socket
_context=self)
File "/usr/lib64/python3.3/ssl.py", line 345, in __init__
raise x
File "/usr/lib64/python3.3/ssl.py", line 341, in __init__
self.do_handshake()
File "/usr/lib64/python3.3/ssl.py", line 548, in do_handshake
self._sslobj.do_handshake()
ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed
(_ssl.c:547)
WARNING: Waiting 10 seconds before retrying.
^CTraceback (most recent call last):
File "/usr/lib/python3.3/site-packages/httplib2/__init__.py", line 992, in
_conn_request
response = conn.getresponse()
File "/usr/lib64/python3.3/http/client.py", line 1135, in getresponse
raise ResponseNotReady(self.__state)
http.client.ResponseNotReady: Idle
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File ".../pywikibot/data/api.py", line 517, in submit
headers=headers, body=body)
File ".../pywikibot/tools.py", line 367, in wrapper
return method(*__args, **__kw)
File ".../pywikibot/comms/http.py", line 258, in request
raise request.data
File ".../pywikibot/comms/threadedhttp.py", line 219, in request
max_redirects, connection_type
File "/usr/lib/python3.3/site-packages/httplib2/__init__.py", line 1272, in
request
(response, content) = self._request(conn, authority, uri, request_uri,
method, body, headers, redirections, cachekey)
File "/usr/lib/python3.3/site-packages/httplib2/__init__.py", line 1026, in
_request
(response, content) = self._conn_request(conn, request_uri, method, body,
headers)
File "/usr/lib/python3.3/site-packages/httplib2/__init__.py", line 999, in
_conn_request
conn.connect()
File "/usr/lib64/python3.3/http/client.py", line 1202, in connect
server_hostname=server_hostname)
File "/usr/lib64/python3.3/ssl.py", line 245, in wrap_socket
_context=self)
File "/usr/lib64/python3.3/ssl.py", line 345, in __init__
raise x
File "/usr/lib64/python3.3/ssl.py", line 341, in __init__
self.do_handshake()
File "/usr/lib64/python3.3/ssl.py", line 548, in do_handshake
self._sslobj.do_handshake()
ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed
(_ssl.c:547)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "pwb.py", line 164, in <module>
run_python_file(fn, argv, argvu)
File "pwb.py", line 69, in run_python_file
exec(compile(source, filename, "exec"), main_mod.__dict__)
File "tests/site_tests.py", line 1481, in <module>
unittest.main()
File "/usr/lib64/python3.3/unittest/main.py", line 125, in __init__
self.runTests()
File "/usr/lib64/python3.3/unittest/main.py", line 265, in runTests
self.result = testRunner.run(self.test)
File "/usr/lib64/python3.3/unittest/runner.py", line 168, in run
test(result)
File "/usr/lib64/python3.3/unittest/suite.py", line 67, in __call__
return self.run(*args, **kwds)
File "/usr/lib64/python3.3/unittest/suite.py", line 105, in run
test(result)
File "/usr/lib64/python3.3/unittest/suite.py", line 67, in __call__
return self.run(*args, **kwds)
File "/usr/lib64/python3.3/unittest/suite.py", line 105, in run
test(result)
File "/usr/lib64/python3.3/unittest/case.py", line 529, in __call__
return self.run(*args, **kwds)
File "/usr/lib64/python3.3/unittest/case.py", line 477, in run
self._executeTestPart(testMethod, outcome, isTest=True)
File "/usr/lib64/python3.3/unittest/case.py", line 422, in _executeTestPart
function()
File "tests/site_tests.py", line 1065, in testRandompages
rn = list(mysite.randompages(total=10))
File ".../pywikibot/site.py", line 3574, in randompages
g_content=content)
File ".../pywikibot/site.py", line 1357, in _generator
gen = gen_class(type_arg, site=self, **args)
File ".../pywikibot/data/api.py", line 1100, in __init__
QueryGenerator.__init__(self, generator=generator, **kwargs)
File ".../pywikibot/data/api.py", line 819, in __init__
self.update_limit() # sets self.prefix
File ".../pywikibot/data/api.py", line 914, in update_limit
for param in self._modules[mod].get("parameters", []):
File ".../pywikibot/data/api.py", line 865, in _modules
data = paramreq.submit()
File ".../pywikibot/data/api.py", line 764, in submit
self._data = super(CachedRequest, self).submit()
File ".../pywikibot/data/api.py", line 535, in submit
self.wait()
File ".../pywikibot/data/api.py", line 651, in wait
time.sleep(self.retry_wait)
KeyboardInterrupt
<class 'KeyboardInterrupt'>
CRITICAL: Waiting for 1 network thread(s) to finish. Press ctrl-c to abort
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=72247
Bug ID: 72247
Summary: http module in py3 doesnt detect and treat SSL
certificate errors correctly
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: ---
Very closely related to bug 72009, the http module should detect SSL
certificate errors and raise a FatalServerException so that api.py doesnt keep
trying to connect. This works in py2, but py3 ssl error codes are different.
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=72305
Bug ID: 72305
Summary: Wikidata scripts fail badly when the default site is
not a client
Product: Pywikibot
Version: core (2.0)
Hardware: All
OS: All
Status: NEW
Severity: major
Priority: Unprioritized
Component: Wikidata
Assignee: Pywikipedia-bugs(a)lists.wikimedia.org
Reporter: jayvdb(a)gmail.com
Web browser: ---
Mobile Platform: ---
newitem fails within the script.
harvest_template, coordinate_import, claimit & illustrate_wikidata fail within
the WikidataBot class, method cacheSources.
$ python pwb.py scripts/newitem.py -newpages
Traceback (most recent call last):
File "pwb.py", line 175, in <module>
run_python_file(fn, argv, argvu)
File "pwb.py", line 69, in run_python_file
exec(compile(source, filename, "exec"), main_mod.__dict__)
File "scripts/newitem.py", line 147, in <module>
main()
File "scripts/newitem.py", line 143, in main
bot = NewItemRobot(generator, **options)
File "scripts/newitem.py", line 52, in __init__
self.pageAgeBefore = self.repo.getcurrenttime() -
timedelta(days=self.pageAge)
AttributeError: 'NoneType' object has no attribute 'getcurrenttime'
<type 'exceptions.AttributeError'>
CRITICAL: Waiting for 1 network thread(s) to finish. Press ctrl-c to abort
$ python pwb.py scripts/harvest_template.py -newpages -template:noun
-family:wiktionary -lang:fr
Traceback (most recent call last):
File "pwb.py", line 175, in <module>
run_python_file(fn, argv, argvu)
File "pwb.py", line 69, in run_python_file
exec(compile(source, filename, "exec"), main_mod.__dict__)
File "scripts/harvest_template.py", line 224, in <module>
main()
File "scripts/harvest_template.py", line 220, in main
bot = HarvestRobot(generator, template_title, fields)
File "scripts/harvest_template.py", line 61, in __init__
self.cacheSources()
File ".../pywikibot/bot.py", line 1066, in cacheSources
page = pywikibot.Page(self.repo, u'List of wikis/python', ns=4)
File ".../pywikibot/tools.py", line 529, in wrapper
return obj(*__args, **__kw)
File ".../pywikibot/page.py", line 127, in __init__
% (type(source), source))
pywikibot.exceptions.Error: Invalid argument type '<type 'NoneType'>' in Page
constructor: None
<class 'pywikibot.exceptions.Error'>
$ python pwb.py scripts/coordinate_import.py -newpages
<same>
<etc>
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=72344
Bug ID: 72344
Summary: Page.previousRevision exception
Product: Pywikibot
Version: core (2.0)
Hardware: All
OS: All
Status: NEW
Severity: critical
Priority: Unprioritized
Component: General
Assignee: Pywikipedia-bugs(a)lists.wikimedia.org
Reporter: jayvdb(a)gmail.com
Web browser: ---
Mobile Platform: ---
Page.previousRevision assumes many revisions are loaded by
Page.getVersionHistory.
$ python pwb.py shell
Welcome to the Pywikibot interactive shell!
>>> import pywikibot
>>> s = pywikibot.Site('en', 'wikipedia')
>>> p = pywikibot.Page(s, 'Main Page')
>>> p.previousRevision()
Traceback (most recent call last):
File "<console>", line 1, in <module>
File ".../pywikibot/page.py", line 550, in previousRevision
revkey = sorted(self._revisions, reverse=True)[1]
IndexError: list index out of range
Page.getVersionHistory loads all revisions only if total is not set, but if
total is set, it only fetches one revision.
>>> p = pywikibot.Page(s, 'Main Page')
>>> p.getVersionHistory()
[(615503846, Timestamp(2014, 7, 4, 0, 24, 48), u'Magioladitis', u'Reverted
edits by [[Special:Contribs/Magioladitis|Magioladitis]] ([[User
talk:Magioladitis|talk]]) to last version by David Levy')]
>>> p.getVersionHistory(total=2)
[(615503846, Timestamp(2014, 7, 4, 0, 24, 48), u'Magioladitis', u'Reverted
edits by [[Special:Contribs/Magioladitis|Magioladitis]] ([[User
talk:Magioladitis|talk]]) to last version by David Levy')]
This change occurred in 2009
http://git.wikimedia.org/commit/pywikibot%2Fcore.git/1946dc13
It can be seen by only running this single test method:
python -m unittest -v tests.page_tests.TestPageObject.testApiMethods
--
You are receiving this mail because:
You are the assignee for the bug.