https://bugzilla.wikimedia.org/show_bug.cgi?id=59973
Web browser: ---
Bug ID: 59973
Summary: Pywikibot should have a
wikibase-error-sitelink-already-used exception
Product: Pywikibot
Version: core (2.0)
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: Unprioritized
Component: Wikidata
Assignee: Pywikipedia-bugs(a)lists.wikimedia.org
Reporter: maarten(a)mdammers.nl
Classification: Unclassified
Mobile Platform: ---
At the moment when you try to add a sitelink to an item at Wikidata that's
already used, you'll get a pywikibot.data.api.APIError.
Sitelink to Commons Category:Mormonism based on P373
failed-save
Site link [//commons.wikimedia.org/wiki/Category:Mormonism Category:Mormonism]
is already used by item [[Q8808767]]. Perhaps the items should be
[[Help:Merge|merged]] and one of them [[Wikidata:Deletion policy|deleted]]?
Request deletion of one of the items at [[Wikidata:Requests for deletion]], or
ask at [[Wikidata:Interwiki conflicts]] if you believe that they should not be
merged.
{u'messages': {u'0': {u'type': u'error', u'name':
u'wikibase-error-sitelink-already-used', u'parameters':
[u'//commons.wikimedia.org/wiki/Category:Mormonism', u'Category:Mormonism',
u'Q8808767', u'commonswiki']}, u'html': {u'*': u'<p>Site link <a
class="external text"
href="//commons.wikimedia.org/wiki/Category:Mormonism">Category:Mormonism</a>
is already used by item <a href="/wiki/Q8808767" title="Q8808767">Q8808767</a>.
Perhaps the items should be <a href="/wiki/Help:Merge"
title="Help:Merge">merged</a> and one of them <a
href="/wiki/Wikidata:Deletion_policy" title="Wikidata:Deletion
policy">deleted</a>? Request deletion of one of the items at <a
href="/wiki/Wikidata:Requests_for_deletion" title="Wikidata:Requests for
deletion" class="mw-redirect">Wikidata:Requests for deletion</a>, or ask at <a
href="/wiki/Wikidata:Interwiki_conflicts" title="Wikidata:Interwiki
conflicts">Wikidata:Interwiki conflicts</a> if you believe that they should not
be merged.\n</p>'}}}
This is a bit too low level for me. This should be caught by either site or
page and a WikiBase exception should be thrown.
The behavior should probably be modeled after the IsRedirectPage exception. We
might want to create some more Wikibase exceptions while we're at it, but I
haven't looked into that.
PageRelatedError
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=59227
Web browser: ---
Bug ID: 59227
Summary: pywikibot.data.api.APIError:
internal_api_error_ReadOnlyError when the database is
locked
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: maarten(a)mdammers.nl
Classification: Unclassified
Mobile Platform: ---
Database is locked at the moment. Makes the pywikibot crash with this error:
Adding new Commons category claim to [[Commons:Category:Green Party of British
Columbia]] based on [[en:Category:Green Party of British Columbia]]
Traceback (most recent call last):
File "C:\pywikibot\core\commonscat_to_wikidata.py", line 238, in <module>
main()
File "C:\pywikibot\core\commonscat_to_wikidata.py", line 235, in main
bot.run()
File "C:\pywikibot\core\commonscat_to_wikidata.py", line 94, in run
newclaim.addSource(source, bot=True)
File "C:\pywikibot\core\pywikibot\page.py", line 2957, in addSource
self.addSources([claim], **kwargs)
File "C:\pywikibot\core\pywikibot\page.py", line 2965, in addSources
data = self.repo.editSource(self, claims, new=True, **kwargs)
File "C:\pywikibot\core\pywikibot\site.py", line 720, in callee
return fn(self, *args, **kwargs)
File "C:\pywikibot\core\pywikibot\site.py", line 3797, in editSource
data = req.submit()
File "C:\pywikibot\core\pywikibot\data\api.py", line 401, in submit
raise APIError(code, info, **result["error"])
pywikibot.data.api.APIError: internal_api_error_ReadOnlyError: Exception
Caught:
The database is currently locked to new entries and other modifications,
probably for routine database maintenance, after which it will be back to
normal.
The administrator who locked it offered this explanation: The database has been
automatically locked while the slave database servers catch up to the master
Should be caught like any other api error, back off, wait some time. Try again
until we reach max tries.
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=56321
Web browser: ---
Bug ID: 56321
Summary: Locked database makes bot crash with
"pywikibot.data.api.APIError"
Product: Pywikibot
Version: core (2.0)
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: Unprioritized
Component: Wikidata
Assignee: Pywikipedia-bugs(a)lists.wikimedia.org
Reporter: maarten(a)mdammers.nl
Classification: Unclassified
Mobile Platform: ---
" File "C:\pywikibot\core\pywikibot\page.py", line 2692, in addClaim
self.repo.addClaim(self, claim, bot=bot, **kwargs)
File "C:\pywikibot\core\pywikibot\site.py", line 709, in callee
return fn(self, *args, **kwargs)
File "C:\pywikibot\core\pywikibot\site.py", line 3581, in addClaim
data = req.submit()
File "C:\pywikibot\core\pywikibot\data\api.py", line 394, in submit
raise APIError(code, info, **result["error"])
pywikibot.data.api.APIError: internal_api_error_ReadOnlyError: Exception
Caught:
The database is currently locked to new entries and other modifications,
probab
ly for routine database maintenance, after which it will be back to normal.
The administrator who locked it offered this explanation: The database has been
automatically locked while the slave database servers catch up to the master
"
Should back off and retry
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=61312
Bug ID: 61312
Summary: protect.py should have different messages for
protect/unprotect pages
Product: Pywikibot
Version: core (2.0)
Hardware: All
OS: All
Status: NEW
Severity: minor
Priority: Unprioritized
Component: General
Assignee: Pywikipedia-bugs(a)lists.wikimedia.org
Reporter: info(a)gno.de
Web browser: ---
Mobile Platform: ---
Now we have the same edit summary for both operations
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=55011
Web browser: ---
Bug ID: 55011
Summary: Support for Wikimedia Labs and Toolserver
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/335/
Reported by: cdpark
Created on: 2013-04-08 01:52:09
Subject: Support for Wikimedia Labs and Toolserver
Original description:
1\. Source directory repositiory
Split pywikipedia source and user config/script. See also
https://wikitech.wikimedia.org/wiki/Nova\_Resource\_Talk:Bots\#Pywikipediab…
Currently, pywikipedia imports\(or includes\) other file from \(1\) source code
directory \(2\) current working directory \(3\) pywikipedia environment,
depends on code. How about to support PYWIKIPEDIA\_HOME or similar environment
for source code repository.
2\. Local mysql mirror support.
In WMLabs and toolserver, access of wikipedia mirror is available. Page.get\(\)
and pagegenerators can be use this information. \(BTW, Page.put\(\) should work
to original site, not mirrors\). It can be also useful for other mediawiki
installs if admin runs some pywikipedia-based script \(e.g. replace.py\) for
his own database.
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=55054
Web browser: ---
Bug ID: 55054
Summary: Add new section to a page
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/273/
Reported by: binbot
Created on: 2010-11-07 16:57:49
Subject: Add new section to a page
Original description:
Hi\! Wikipedia.Page has now to saving methods, put\(newtext\) and
put\_async\(newtext\). I ask you to introduce a third one:
newsection\(title,newtext\). It should work as ...action=edit§ion=new, so
we shouldn't bother the old content of the page to add something to the end.
Thanks a lot\!
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=55104
Web browser: ---
Bug ID: 55104
Summary: Recreate deleted page
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/144/
Reported by: Anonymous user
Created on: 2008-04-19 14:50:59
Subject: Recreate deleted page
Original description:
I searched and found closed and open bugs on recreating deleted pages, but I
think I can put it differently than others:
I \*want\* to use pagefromfile to upload a large amount of text that a user
upload badly by hand. Those pages have been deleted and would be much better
created en masse by the bot. I understand why most people would not want their
bots creating previously deleted pages, but it should be an option. Even if I
had to hit "Y" every time like I do with deletes, it should be possible.
I tried removing the pertaining objections in wikipedia.py, but the layout on
editing a previously deleted page is too different.
This should be an easy error to recreate.
mrandmrsmurphy(a)gmail.com
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=58941
Web browser: ---
Bug ID: 58941
Summary: [tracking] Missing unit tests
Product: Pywikibot
Version: core (2.0)
Hardware: All
OS: All
Status: NEW
Keywords: easy
Severity: normal
Priority: Unprioritized
Component: General
Assignee: Pywikipedia-bugs(a)lists.wikimedia.org
Reporter: valhallasw(a)arctus.nl
Blocks: 58940
Classification: Unclassified
Mobile Platform: ---
This is a bug to track unit tests that should be added. These bugs might be
interesting for new contributors.
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=55150
Web browser: ---
Bug ID: 55150
Summary: wikidata error
Product: Pywikibot
Version: unspecified
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: Unprioritized
Component: interwiki.py
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/1586/
Reported by: Anonymous user
Created on: 2013-02-23 10:30:20
Subject: wikidata error
Original description:
Some script says they might work with wikidata, but:
E:\Pywikipedia>interwiki.py -cleanup cs:wikipedie:wikidata -repository
Getting 1 page from wikipedia:cs...
\[\[cs:Wikipedie:Wikidata\]\]: \[\[cs:Wikipedie:Wikidata\]\] gives new
interwiki \[\[simpl
e:Wikipedia:Wikidata\]\]
\[\[cs:Wikipedie:Wikidata\]\]: \[\[cs:Wikipedie:Wikidata\]\] gives new
interwiki \[\[en:Wi
kipedia:Wikidata\]\]
\[\[cs:Wikipedie:Wikidata\]\]: \[\[cs:Wikipedie:Wikidata\]\] gives new
interwiki \[\[fr:Wi
kipédia:Wikidata\]\]
\[\[cs:Wikipedie:Wikidata\]\]: \[\[cs:Wikipedie:Wikidata\]\] gives new
interwiki \[\[de:Wi
kipedia:Wikidata\]\]
\[\[cs:Wikipedie:Wikidata\]\]: \[\[cs:Wikipedie:Wikidata\]\] gives new
interwiki \[\[hu:Wi
kipédia:Wikidata\]\]
\[\[cs:Wikipedie:Wikidata\]\]: \[\[cs:Wikipedie:Wikidata\]\] gives new
interwiki \[\[sv:Wi
kipedia:Wikidata\]\]
Getting 1 page from wikipedia:simple...
Getting 1 page from wikidata:wikidata...
Traceback \(most recent call last\):
File "E:\Pywikipedia\pagegenerators.py", line 1222, in \_\_iter\_\_
for loaded\_page in self.preload\(somePages\):
File "E:\Pywikipedia\pagegenerators.py", line 1241, in preload
pywikibot.getall\(site, pagesThisSite\)
File "E:\Pywikipedia\wikipedia.py", line 5289, in getall
\_GetAll\(site, pages, throttle, force\).run\(\)
File "E:\Pywikipedia\wikipedia.py", line 4908, in run
data = self.getData\(\)
File "E:\Pywikipedia\wikipedia.py", line 5078, in getData
pagenames = u'\r\n'.join\(pagenames\)
TypeError: sequence item 0: expected string or Unicode, NoneType found
sequence item 0: expected string or Unicode, NoneType found
Dump cs \(wikipedia\) appended.
Traceback \(most recent call last\):
File "E:\Pywikipedia\interwiki.py", line 2602, in <module>
main\(\)
File "E:\Pywikipedia\interwiki.py", line 2576, in main
bot.run\(\)
File "E:\Pywikipedia\interwiki.py", line 2309, in run
self.queryStep\(\)
File "E:\Pywikipedia\interwiki.py", line 2282, in queryStep
self.oneQuery\(\)
File "E:\Pywikipedia\interwiki.py", line 2278, in oneQuery
subject.batchLoaded\(self\)
File "E:\Pywikipedia\interwiki.py", line 1338, in batchLoaded
\(skip, alternativePage\) = self.disambigMismatch\(page, counter\)
File "E:\Pywikipedia\interwiki.py", line 1122, in disambigMismatch
elif not self.originPage.isDisambig\(\) and page.isDisambig\(\):
File "E:\Pywikipedia\wikipedia.py", line 1563, in isDisambig
self.templates\(\)\)
File "E:\Pywikipedia\wikipedia.py", line 2799, in templates
get\_redirect=get\_redirect\)\]\)\)
File "E:\Pywikipedia\wikipedia.py", line 2818, in templatesWithParams
thistxt = removeDisabledParts\(thistxt\)
File "E:\Pywikipedia\pywikibot\textlib.py", line 225, in removeDisabledParts
return toRemoveR.sub\('', text\)
TypeError: expected string or buffer
E:\Pywikipedia>version.py
Pywikipedia trunk/pywikipedia/ \(r11103, 2013/02/22, 16:14:56, ok\)
Python 2.7.2 \(default, Jun 12 2011, 15:08:59\) \[MSC v.1500 32 bit \(Intel\)\]
config-settings:
use\_api = True
use\_api\_login = True
unicode test: ok
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=55235
Web browser: ---
Bug ID: 55235
Summary: Treat code-only interwikis as valid for main page
Product: Pywikibot
Version: unspecified
Hardware: All
OS: All
Status: ASSIGNED
Severity: normal
Priority: Unprioritized
Component: interwiki.py
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/1344/
Reported by: Anonymous user
Created on: 2011-09-19 11:07:11
Subject: Treat code-only interwikis as valid for main page
Assigned to: xqt
Original description:
Interwiki in the form of \[\[en:\]\] links to the main page.
It is easy to generate \(on Toolserver or from SiteMatrix\) a list of
interwikis in this form for the main page and they are correct links.
So the bot must not remove them nor change them.
Suggesting the following process:
1\) Pull MediaWiki:Mainpage and store it in some variable.
2\) When dealing with interwiki, first compare, if the page title == that
variable.
3\) If yes, simply put short interwikis there \(or at least do not remove nor
correct them to long\)
--
You are receiving this mail because:
You are the assignee for the bug.