https://bugzilla.wikimedia.org/show_bug.cgi?id=69060
Bug ID: 69060
Summary: makecat does not work with command line arguments
Product: Pywikibot
Version: core (2.0)
Hardware: PC
OS: Linux
Status: NEW
Severity: major
Priority: Unprioritized
Component: General
Assignee: Pywikipedia-bugs(a)lists.wikimedia.org
Reporter: jayvdb(a)gmail.com
Web browser: ---
Mobile Platform: ---
When the category name is put on the command line in Linux
$ python pwb.py scripts/makecat.py -family:wikipedia -lang:en Roads_in_Kent
Traceback (most recent call last):
File "pwb.py", line 157, 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/makecat.py", line 217, in <module>
workingcatname = unicode(workingcatname, 'utf-8')
TypeError: decoding Unicode is not supported
<type 'exceptions.TypeError'>
CRITICAL: Waiting for 1 network thread(s) to finish. Press ctrl-c to abort
It works correctly if the category name is entered via pywikibot.input()
$ python pwb.py scripts/makecat.py -family:wikipedia -lang:en
Which page to start with? Roads_in_Kent
WARNING: unicode.setAction is DEPRECATED, use comment parameter for page saving
method instead.
Retrieving 32 pages from wikipedia:en.
Retrieving 50 pages from wikipedia:en.
==Roy Phippen==
....
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=65119
Bug ID: 65119
Summary: Implement Flow support in Pywikibot
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
Web browser: ---
Mobile Platform: ---
Flow is the new communication extension, see
https://www.mediawiki.org/wiki/Flow . We should implement it in Pywikibot.
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=50344
John Mark Vandenberg <jayvdb(a)gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Depends on| |69068
--
You are receiving this mail because:
You are on the CC list for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=69064
Bug ID: 69064
Summary: getFileVersionHistoryTable raises ValueError: too many
values to unpack
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: ---
For example running imagetransfer
$ python pwb.py imagetransfer -family:wikipedia -lang:en
'File:blahblahblah.jpg' -tolang:fa
URL should be: https://upload.wikimedia.org/wikipedia/en/d/d4/blahblahblah.jpg
Traceback (most recent call last):
File "pwb.py", line 157, 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/imagetransfer.py", line 356, in <module>
main()
File "scripts/imagetransfer.py", line 353, in main
bot.run()
File "scripts/imagetransfer.py", line 293, in run
self.transferImage(imagelist[todo])
File "scripts/imagetransfer.py", line 188, in transferImage
description += '\n\n' + str(sourceImagePage.getFileVersionHistoryTable())
File ".../pywikibot/page.py", line 1870, in getFileVersionHistoryTable
in self.getFileVersionHistory():
ValueError: too many values to unpack
<type 'exceptions.ValueError'>
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=54560
Web browser: ---
Bug ID: 54560
Summary: archivebot.py edit summary i18n improvement
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/561/
Reported by: acstroe
Created on: 2012-08-16 07:18:55
Subject: archivebot.py edit summary i18n improvement
Original description:
The edit summary of archivebot explains how old archived messages are, by using
the configuration string, e.g. 45d or 24h. On request from some users on ro.wp,
I have added a function that interprets these strings in accordance with the
local wiki settings. It uses the MediaWiki:Hours and MediaWiki:Days messages to
obtain the local language string. Since all wikis I tries use the PLURAL parser
function and parser functions are not interpreted in the wiki edit summary, I
parsed the PLURAL function to obtain the actual string. If the PLURAL function
is not supported, then the exact text of the MediaWiki:Hours and MediaWiki:Days
is used \(after replacing $1 with the actual number\). If the MediaWiki:Hours
or MediaWiki:Days messages are not found, then the initial configuration string
is used.
See also
https://ro.wikipedia.org/wiki/Wikipedia:Sarcini\_pentru\_robo%C8%9Bi\#Arhiv…
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=50344
--- Comment #5 from John Mark Vandenberg <jayvdb(a)gmail.com> ---
To avoid executing malicious code, the simplest approach is to do the tests
only if someone trusted uploaded or +1'd the changeset.
I see that mediawiki-core has phpunit and qunit tests being run. Couldnt those
tests run malicious code too?
The problems with _only_ running tests against a different mediawiki install is
that a) the tests will nearly all need to be rewritten, and family files need
to be built for the complex inter-language/wiki relationships, and b) it still
must be isolated to prevent malicious code (using urllib2/httplib2) attacking
non test servers.
Re my last post, rather than using config.actions_to_block, a HTTP proxy could
be used to prevent any network traffic except whitelisted API actions.
Then the 'only' problem is local/filesystem tomfoolery, and an OS-enforced
sandbox will do the trick, and is quite easy.
Some tests don't depend on a server at all, and it would be good to start with
just running those tests, running the tests in a sandbox which isnt allowed to
use sockets and threads, or files other than those on a whitelist (and
apicache/*).
textlib for example, depends on family file information, and some siteinfo
which could (and probably should) be permanently stored in the family file and
only refreshed periodically. At worse we could build a MockEnWpSite to run
those tests against. We've just had a massive build breakage that lasted about
a week because of textlib changes which were not tested against the current
tests, and one of the checked in 'fixes' included changes to wikibase_tests.py
that didnt compile. It would be nice if code review didnt include checking the
code compiles and unit tests pass - that wastes time, and the workpit cant be
used for something else while the pywiki test suite runs, for at least 15 mins.
--
You are receiving this mail because:
You are on the CC list for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=68986
Bug ID: 68986
Summary: high lag during log initialisation
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: ---
If initialisation is going to be slowed down due to server lag, the user should
be informed.
$ python pwb.py featured
Sleeping for 120.0 seconds, 2014-08-01 11:02:01
^CTraceback (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/featured.py", line 622, in <module>
main()
File "scripts/featured.py", line 603, in main
for arg in pywikibot.handleArgs():
File ".../pywikibot/bot.py", line 648, in handleArgs
init_handlers()
File ".../pywikibot/bot.py", line 242, in init_handlers
writelogheader()
File ".../pywikibot/bot.py", line 274, in writelogheader
log(u'SITE VERSION: %s' % unicode(site.live_version()))
File ".../pywikibot/site.py", line 1278, in live_version
versionstring = self.siteinfo['generator']
File ".../pywikibot/site.py", line 1184, in siteinfo
self._getsiteinfo()
File ".../pywikibot/site.py", line 1116, in _getsiteinfo
sidata = sirequest.submit()
File ".../pywikibot/data/api.py", line 505, in submit
self._data = super(CachedRequest, self).submit()
File ".../pywikibot/data/api.py", line 405, in submit
self.site.throttle.lag(int(lag.group("lag")))
File ".../pywikibot/throttle.py", line 310, in lag
time.sleep(wait)
KeyboardInterrupt
<type 'exceptions.KeyboardInterrupt'>
CRITICAL: Waiting for 1 network thread(s) to finish. Press ctrl-c to abort
Ideally, server version should be fetched and logged asynchronously.
This is similar to the repo log version, for which was added a config var to
bypass. (log_pywiki_repo_version = False)
--
You are receiving this mail because:
You are the assignee for the bug.