https://bugzilla.wikimedia.org/show_bug.cgi?id=55283
Web browser: ---
Bug ID: 55283
Summary: sectionencode incorrectly encoding
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/1147/
Reported by: Anonymous user
Created on: 2010-03-16 22:21:02
Subject: sectionencode incorrectly encoding
Original description:
>>> wikipedia.sectionencode\(':/', 'utf-8'\)
'.3A/'
Which is incorrect as it is ":.2F"
The correct code for sectionencode\(\) should be:
return urllib.quote\(text.replace\(" ","\_"\).encode\(encoding\),
safe=':'\).replace\("%","."\)
Also, it would be nice if encoding defaulted here to 'utf-8'
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=54561
Web browser: ---
Bug ID: 54561
Summary: lonely pages as an handlearg
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/patches/559/
Reported by: nickanc
Created on: 2012-08-04 19:31:11
Subject: lonely pages as an handlearg
Original description:
This is the first time I make edits to pagegenerators.py. I added a new
parameter -lonelypages:n to work on lonely pages. :\)
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=65971
Bug ID: 65971
Summary: saving a page with empty text should be allowed with
force flag
Product: Pywikibot
Version: core (2.0)
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: Unprioritized
Component: General
Assignee: Pywikipedia-bugs(a)lists.wikimedia.org
Reporter: ian(a)iankelling.org
Web browser: ---
Mobile Platform: ---
http://lists.wikimedia.org/pipermail/pywikipedia-l/2014-May/008740.html
There is a force flag, in the code, but it is not used to allow saving empty
pages. It should be. Probably an easy fix along with this is that the correct
exception is caught in Page._save and not re-raised - instead, a different
Exception is raised, which makes it harder to debug the code.
Here is an example script, and the error when running it
import pywikibot
site = pywikibot.Site()
page = pywikibot.Page(site, "MediaWiki:Lastmodifiedat")
page.text = ""
page.save()
Logging in to ianwiki:en as Ian Kelling
Traceback (most recent call last):
File "pwb.py", line 143, 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/iansetup.py", line 5, in <module>
page.save()
File "/a/opt/pywikibot/pywikibot/page.py", line 858, in save
**kwargs)
File "/a/opt/pywikibot/pywikibot/page.py", line 884, in _save
raise pywikibot.PageNotSaved("%s: %s" % (link, err))
pywikibot.exceptions.PageNotSaved
CRITICAL: Waiting for 1 network thread(s) to finish. Press ctrl-c to abort
<class 'pywikibot.exceptions.PageNotSaved'>
The cause is in site.py, in def editpage, line 2699:
if not text:
raise Error("editpage: no text to be saved")
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=54235
--- Comment #3 from Kunal Mehta (Legoktm) <legoktm.wikipedia(a)gmail.com> ---
(In reply to John Mark Vandenberg from comment #2)
> It looks like the problem mentioned in comment 1 is no longer an problem, as
> the JSON now includes the mainsnak datatype, whereas I assume it didnt
> previously based on comment 1.
>
Awesome!
> If I understand this correctly, any time the JSON parser finds a 'datatype'
> in a snak, it can use that instead of doing a lookup. The JSON *may* not
> include this, in which a lookup is required, and if a lookup isnt possible
> then the code should raise an appropriate exception.
Yup, sounds good.
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=65758
xqt <info(a)gno.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |maarten(a)mdammers.nl
--- Comment #2 from xqt <info(a)gno.de> ---
*** Bug 65940 has been marked as a duplicate of this bug. ***
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=65430
Maarten Dammers <maarten(a)mdammers.nl> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |crown_s(a)rambler.ru,
| |jklamo(a)atlas.cz
--- Comment #1 from Maarten Dammers <maarten(a)mdammers.nl> ---
Same for companies and their headquarters.
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=65312
xqt <info(a)gno.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|Pywikipedia-bugs(a)lists.wiki |info(a)gno.de
|media.org |
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=65312
--- Comment #3 from JAn Dudík <jan.dudik(a)gmail.com> ---
Created attachment 15531
--> https://bugzilla.wikimedia.org/attachment.cgi?id=15531&action=edit
Patch for accidenatlly created userpages
When I accidentally forgot to add -namespace:0, bot should'nt create new items
for userpages
(note:there is change of default dates too, I am not very familiar with
creating patches, so I left it in patch too)
Source:
https://www.wikidata.org/w/index.php?
title=User%3AUnderlying_lk%2Fharvest_template.py&diff=116897965&oldid=116884354
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=54235
John Mark Vandenberg <jayvdb(a)gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jayvdb(a)gmail.com
--- Comment #2 from John Mark Vandenberg <jayvdb(a)gmail.com> ---
It looks like the problem mentioned in comment 1 is no longer an problem, as
the JSON now includes the mainsnak datatype, whereas I assume it didnt
previously based on comment 1.
e.g. q76 JSON now includes "datatype"
"P18": [
{
"id": "q76$AA25BE21-FFCA-4C0A-A7B4-C041CBE549F7",
"mainsnak": {
"snaktype": "value",
"property": "P18",
"datatype": "commonsMedia",
"datavalue": {
"value": "President Barack Obama.jpg",
"type": "string"
}
},
I ran into a very tightly related bug while loading items from an xml dump,
without access to the wiki the dump was from - such as with a firewall in the
way.
If I understand this correctly, any time the JSON parser finds a 'datatype' in
a snak, it can use that instead of doing a lookup. The JSON *may* not include
this, in which a lookup is required, and if a lookup isnt possible then the
code should raise an appropriate exception.
--
You are receiving this mail because:
You are the assignee for the bug.