https://bugzilla.wikimedia.org/show_bug.cgi?id=54569
Web browser: ---
Bug ID: 54569
Summary: Retrieve / edit the section
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/521/
Reported by: lankier
Created on: 2011-07-15 10:11:55
Subject: Retrieve / edit the section
Original description:
This patch adds new parameter 'section' to Page.get & Page.put.
\(See also feature requests
https://sourceforge.net/tracker/?func=detail&atid=603141&aid=3104703&group\…
\)
Examples:
add a new section:
page.put\('New section text', comment='New section header', section='new'\)
edit the top section:
text = page.get\(section=0\)
page.put\(text+'\n\n==New section==\nNew text', section=0\)
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=54685
Web browser: ---
Bug ID: 54685
Summary: WindowsError: [Error 32] while renaming log file
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
Classification: Unclassified
Mobile Platform: ---
Getting [[Kategorie:Wikipedia:Seite mit fehlendem References-Tag]] list...
Traceback (most recent call last):
File "C:\Python27\lib\logging\handlers.py", line 78, in emit
self.doRollover()
File "C:\Python27\lib\logging\handlers.py", line 338, in doRollover
os.rename(self.baseFilename, dfn)
WindowsError: [Error 32] Der Prozess kann nicht auf die Datei zugreifen, da sie
von einem anderen Prozess verwendet wird
Logged from file wikipedia.py, line 9333
Getting 5 pages from wikipedia:de...
Traceback (most recent call last):
File "C:\Python27\lib\logging\handlers.py", line 78, in emit
self.doRollover()
File "C:\Python27\lib\logging\handlers.py", line 338, in doRollover
os.rename(self.baseFilename, dfn)
WindowsError: [Error 32] Der Prozess kann nicht auf die Datei zugreifen, da sie
von einem anderen Prozess verwendet wird
Logged from file wikipedia.py, line 9333
>>> Briefwahl <<<
Traceback (most recent call last):
File "C:\Python27\lib\logging\handlers.py", line 78, in emit
self.doRollover()
File "C:\Python27\lib\logging\handlers.py", line 338, in doRollover
os.rename(self.baseFilename, dfn)
WindowsError: [Error 32] Der Prozess kann nicht auf die Datei zugreifen, da sie
von einem anderen Prozess verwendet wird
Logged from file wikipedia.py, line 9333
No changes necessary: references tag found.
Traceback (most recent call last):
File "C:\Python27\lib\logging\handlers.py", line 78, in emit
self.doRollover()
File "C:\Python27\lib\logging\handlers.py", line 338, in doRollover
os.rename(self.baseFilename, dfn)
WindowsError: [Error 32] Der Prozess kann nicht auf die Datei zugreifen, da sie
von einem anderen Prozess verwendet wird
Logged from file wikipedia.py, line 9333
C:\pwb\compat>version.py
Pywikipedia wikipedia.py (r-1 (unknown), ???????, 2013/09/19, 07:37:28,
OUTDATED
)
Python 2.7.3 (default, Apr 10 2012, 23:24:47) [MSC v.1500 64 bit (AMD64)]
config-settings:
use_api = True
use_api_login = True
unicode test: ok
C:\pwb\compat>
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=54572
Web browser: ---
Bug ID: 54572
Summary: non ascii in system messages and max retry
Product: Pywikibot
Version: unspecified
Hardware: All
OS: All
Status: ASSIGNED
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/477/
Reported by: lankier
Created on: 2010-10-22 10:26:44
Subject: non ascii in system messages and max retry
Assigned to: xqt
Original description:
This patch fixed two issues:
1\. Ubuntu has non ascii in system messages.
Test:
$ sudo ifconfig eth0 down
$ cat test.py
import wikipedia
site = wikipedia.getSite\(\)
page = wikipedia.Page\(site, 'S'\)
text = page.get\(\)
$ LANG=ru\_RU.utf8 python test.py
Error downloading data: 'ascii' codec can't decode byte 0xd0 in position 27:
ordinal not in range\(128\)
Request
ru:/w/api.php?inprop=protection%7Ctalkid%7Csubjectid%7Curl%7Creadable&format=json&rvprop=content%7Cids%7Cflags%7Ctimestamp%7Cuser%7Ccomment%7Csize&prop=revisions%7Cinfo&titles=S&rvlimit=1&action=query
Retrying in 1 minutes...
^C
After fix \(added "e = unicode\(str\(e\), locale.getpreferredencoding\(\)\)"\):
$ LANG=ru\_RU.utf8 python test.py
<urlopen error \[Errno 101\] Сеть недоступна>
WARNING: Could not open \[...\]
2\. Added raise MaxTriesExceededError when max tries exceeded.
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=54311
Web browser: ---
Bug ID: 54311
Summary: Random api errors
Product: Pywikibot
Version: unspecified
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: ---
I'm running several bots and every once in a while a bot crashes:
Adding new template claim to [[wikidata:Q6614219]]
Traceback (most recent call last):
File "C:\pywikibot\core\add_template.py", line 120, in <module>
main()
File "C:\pywikibot\core\add_template.py", line 117, in main
bot.run()
File "C:\pywikibot\core\add_template.py", line 52, in run
item.addClaim(newclaim)
File "C:\pywikibot\core\pywikibot\page.py", line 2676, 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 3578, 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: badtoken: * '''Sorry! We could not process your
edi
t due to a loss of session data.'''
Please try again.
If it still does not work, try [[Special:UserLogout|logging out]] and logging
ba
ck in.
* There seems to be a problem with your login session;
this action has been canceled as a precaution against session hijacking.
Go back to the previous page, reload that page and then try again.
This exception should be caught and the addClaim should be retried.
Maybe a Wikidata bug should be filed too to figure out why we seem to loose
session data every once in a while
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=54547
Web browser: ---
Bug ID: 54547
Summary: sync.py, linkreports.py and phpfrontforpywikibot
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/609/
Reported by: valhallasw
Created on: 2013-04-13 21:11:43
Subject: sync.py, linkreports.py and phpfrontforpywikibot
Original description:
See http://lists.wikimedia.org/pipermail/pywikipedia-l/2013-March/007776.html
and http://lists.wikimedia.org/pipermail/pywikipedia-l/2013-March/007785.html
\------------
I have been working on some additions to the pywikipediabot framework.
I'd be happy if my code could be useful to others.
sync.py helps synchronizing different wikis. It goes through a bunch
of namespaces and creates an overview of pages that are different,
this is already useful for Templates and MediaWiki but especially
useful when dealing with semantic mediawiki, where a lot of the
functionality lives in namespaces such as Property, Type and Form.
linkreports.py creates a page with a table of broken links, first
date, last date and error message.
I also wrote a little PHP frontend that lets people run a
pywikipediabot replace script \(it's for folks who can't or don't want
to use anything on a commandline\). This can probably live on its own
on github, but it might be a bit too custom at this point and I'd like
to have some comments on it.
This PHP frontend is available at https://github.com/guaka/phpfrontforpywikibot
It's pretty rough still but releasing it forces me to think about the
public release when adding more functionality.
I'm not sure how to proceed with getting sync.py and linkreports.py in
the official repo. Shall I just put them up on github so you can take
a look? I'm looking forward to your ideas.
Kasper
\----------------------
On Mon, Mar 11, 2013 at 11:10 AM, Kasper Souren <kasper.souren(a)gmail.com>
wrote:
> I'm not sure how to proceed with getting sync.py and linkreports.py in
> the official repo. Shall I just put them up on github so you can take
> a look? I'm looking forward to your ideas.
Didn't hear anything back in a week so I just put stuff up here:
https://github.com/guaka/pywikibot-extras
Still needs a bit of work to make it more generic but sync.py could
already be useful as is.
\-------------------
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=69664
Bug ID: 69664
Summary: WikibasePage.save fails on python2.6
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: jayvdb(a)gmail.com
Web browser: ---
Mobile Platform: ---
Following on from bug 66120, we now get a TypeError during save (and other Page
write methods). The test added in the last changeset is identifying the issue:
ERROR: test_page_methods (__main__.TestPageMethods)
Test ItemPage methods inherited from superclass Page.
----------------------------------------------------------------------
Traceback (most recent call last):
File "tests/wikibase_tests.py", line 418, in test_page_methods
self.assertRaises(pywikibot.PageNotSaved, self.wdp.save)
File "/usr/local/lib/python2.6/site-packages/unittest2/case.py", line 475, in
assertRaises
callableObj(*args, **kwargs)
File ".../pywikibot/__init__.py", line 476, in wrapper
return method(*__args, **__kw)
File ".../pywikibot/page.py", line 954, in save
if not force and not self.botMayEdit():
File ".../pywikibot/page.py", line 883, in botMayEdit
templates = self.templatesWithParams()
File ".../pywikibot/__init__.py", line 476, in wrapper
return method(*__args, **__kw)
File ".../pywikibot/page.py", line 1257, in templatesWithParams
templates = textlib.extract_templates_and_params(self.text)
File ".../pywikibot/textlib.py", line 923, in extract_templates_and_params
return extract_templates_and_params_regex(text)
File ".../pywikibot/textlib.py", line 943, in
extract_templates_and_params_regex
thistxt = removeDisabledParts(text)
File ".../pywikibot/textlib.py", line 293, in removeDisabledParts
return toRemoveR.sub('', text)
TypeError: expected string or buffer
That test hasnt caused an error for a while, but this test is against
test.wikidata.org which has had a few other bugs needing fixing, and the server
config appears to be changing frequently (getting better).
The error we see now is:
1. Page.save method calls botMayEdit
2. which calls templatesWithParams to look for {{nobots}}
3. which loads 'self.text' and
4. asks textlib.extract_templates_and_params() to extract all the templates
Page.text calls Page.get, which is supposed to return a string.
On a WikibasePage, .get returns a dict instead of a string.
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=70978
Bug ID: 70978
Summary: win32 py3 sub error
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: ---
An error that only happens on py3
======================================================================
ERROR: test_item_templates (tests.wikibase_tests.TestPageMethods)
Test templatesWithParams.
----------------------------------------------------------------------
Traceback (most recent call last):
File "c:\pywiki\core\tests\wikibase_tests.py", line 511, in test_item_templa
tes
self.wdp.templatesWithParams()
File "c:\pywiki\core\pywikibot\tools.py", line 317, in wrapper
return method(*__args, **__kw)
File "c:\pywiki\core\pywikibot\page.py", line 1267, in templatesWithParams
templates = textlib.extract_templates_and_params(self.text)
File "c:\pywiki\core\pywikibot\textlib.py", line 924, in extract_templates_a
nd_params
return extract_templates_and_params_regex(text)
File "c:\pywiki\core\pywikibot\textlib.py", line 951, in extract_templates_a
nd_params_regex
thistxt = removeDisabledParts(text)
File "c:\pywiki\core\pywikibot\textlib.py", line 294, in removeDisabledParts
return toRemoveR.sub('', text)
TypeError: expected string or buffer
(And that error causes the following error)
======================================================================
ERROR: test_item_bot_may_edit (tests.wikibase_tests.TestPageMethods)
Test botMayEdit.
----------------------------------------------------------------------
Traceback (most recent call last):
File "c:\pywiki\core\tests\wikibase_tests.py", line 521, in test_item_bot_ma
y_edit
self.assertTrue(item.botMayEdit())
File "c:\pywiki\core\pywikibot\page.py", line 897, in botMayEdit
templates = self.templatesWithParams()
File "c:\pywiki\core\pywikibot\tools.py", line 317, in wrapper
return method(*__args, **__kw)
File "c:\pywiki\core\pywikibot\page.py", line 1267, in templatesWithParams
templates = textlib.extract_templates_and_params(self.text)
File "c:\pywiki\core\pywikibot\textlib.py", line 924, in extract_templates_a
nd_params
return extract_templates_and_params_regex(text)
File "c:\pywiki\core\pywikibot\textlib.py", line 951, in extract_templates_a
nd_params_regex
thistxt = removeDisabledParts(text)
File "c:\pywiki\core\pywikibot\textlib.py", line 294, in removeDisabledParts
return toRemoveR.sub('', text)
TypeError: expected string or buffer
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=54541
Web browser: ---
Bug ID: 54541
Summary: When loging in to a site, try the site-configured
username if any
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/621/
Reported by: gallaecio
Created on: 2013-08-03 20:30:54.056000
Subject: When loging in to a site, try the site-configured username if any
Original description:
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=54554
Web browser: ---
Bug ID: 54554
Summary: spellcheck.py — Remember words skipped in a page
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/576/
Reported by: Anonymous user
Created on: 2012-11-15 11:49:53
Subject: spellcheck.py — Remember words skipped in a page
Original description:
When you use the spellcheck.py script and use the p switch for a word, it is
ignored for the whole page, indeed. However, when you run the script again on
the same page, you get the word yet again. I think the spellchecker should
remember you want to skip that word on that page.
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=54555
Web browser: ---
Bug ID: 54555
Summary: Force retrieval of last edit time
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/571/
Reported by: strainu
Created on: 2012-10-27 15:35:07
Subject: Force retrieval of last edit time
Original description:
This patch changes the Page.editTime function in order to allow the user to
request a valid editTime even if the page has not yet been fetched. The API
call used is theoretically much lighter than retrieving the whole page. The
default behavior remains unchanged.
--
You are receiving this mail because:
You are the assignee for the bug.