https://bugzilla.wikimedia.org/show_bug.cgi?id=60214
Web browser: ---
Bug ID: 60214
Summary: testImageusage in site_tests fails
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: mpaa.wiki(a)gmail.com
Classification: Unclassified
Mobile Platform: ---
Line 549 in site_tests.py fails:
for using in mysite.imageusage(imagepage, namespaces=[3, 4], total=5):
self.assertType(using, pywikibot.Page)
self.assertTrue(imagepage in list(using.imagelinks())) --> fails
imagepage on main page (current 'Main Page' on ew:WP) is different from images
in list(using.imagelinks()), in cached data in
c:\\users\\...\\AppData\\Roaming\\pywikibot\\apicache\\ff322b...
Cached data is used due to monkey patching in tests/__init__.py
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=55522
Web browser: ---
Bug ID: 55522
Summary: Option to delete image in imagecopy.py once it's been
transferred
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: ---
Once an image has been copied with imagecopy.py and a sysop account is
configured for that wiki, we should provide an option to delete the image.
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=71124
Bug ID: 71124
Summary: Add ability to add/subtract months to/from
pywikibot.Timestamp
Product: Pywikibot
Version: core (2.0)
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: Unprioritized
Component: General
Assignee: Pywikipedia-bugs(a)lists.wikimedia.org
Reporter: info(a)gno.de
Web browser: ---
Mobile Platform: ---
mw is able to calculate with parser variable #time e.g. to add or subtract
months to the given time. python does not support it with standard libs and
dateutils is not part of the framework. On the other hand it would be great to
have such a feature calculating months with Timestamps.
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=71400
Bug ID: 71400
Summary: When an image deleted before imagetransfer.py asks
many times: Do you want to ignore? ([y]es, [N]o)
Product: Pywikibot
Version: core (2.0)
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: Unprioritized
Component: Other scripts
Assignee: Pywikipedia-bugs(a)lists.wikimedia.org
Reporter: reza.energy(a)gmail.com
Web browser: ---
Mobile Platform: ---
When an image deleted before on target wiki imagetransfer.py asks many times:
Do you want to ignore? ([y]es, [N]o)
If you write y it will continue aking also it will upload new revetions on
image page!
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=58907
Web browser: ---
Bug ID: 58907
Summary: Site.upload(ignore_warnings=True) will still raise
UploadWarnings
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: legoktm.wikipedia(a)gmail.com
Classification: Unclassified
Mobile Platform: ---
When uploading a file, I have ignore_warnings=True. This value is passed to the
API, so the upload completes successfully. However, pywikibot sees the
'warnings' dict and then raises an UploadWarning exception, even though I've
suppressed the warnings.
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=69090
Bug ID: 69090
Summary: upload.py attempts uploads on wikis that dont allows
uploads
Product: Pywikibot
Version: core (2.0)
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: Unprioritized
Component: General
Assignee: Pywikipedia-bugs(a)lists.wikimedia.org
Reporter: jayvdb(a)gmail.com
Web browser: ---
Mobile Platform: ---
Uploads are disabled on Wikidata: https://www.wikidata.org/wiki/Special:Upload
upload.py happily allows the user to attempt to upload, but then reports an
APIError. If pywikibot cant detect whether uploads are enabled before upload,
it should detect this APIError and provide a nice response for the user.
$ python pwb.py -family:wikidata -lang:wikidata scripts/upload.py
No input filename given
File or URL where image is now: blahblah.png
The filename on the target wiki will default to: blahblah.png
Enter a better name, or press enter to accept:
The suggested description is:
Do you want to change this description? ([y]es, [N]o) y
Uploading file to wikidata:wikidata via API....
Reading file blahblah.png
ERROR: Upload error:
Traceback (most recent call last):
File "scripts/upload.py", line 216, in upload_image
ignore_warnings=self.ignoreWarning)
File ".../pywikibot/site.py", line 3432, in upload
result = req.submit()
File ".../pywikibot/data/api.py", line 418, in submit
raise APIError(code, info, **result["error"])
APIError: uploaddisabled: Uploads are not enabled. Make sure $wgEnableUploads
is set to true in LocalSettings.php and the PHP ini setting file_uploads is
true
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=71104
Bug ID: 71104
Summary: page.isRedirectPage() reports always False after
page.isDisambig()
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: CommodoreFabianus(a)gmx.de
Web browser: ---
Mobile Platform: ---
When calling page.isDisambig() a page.isRedirectPage() followed after that is
reporting it always false. Calling 'page.text' does 'fix' that so that it
returns the actual value.
>>> import pywikibot
>>> enwp = pywikibot.Site('en', 'wikipedia')
>>> page = pywikibot.Page(enwp, 'TBBT')
>>> page.isRedirectPage()
True
>>> page = pywikibot.Page(enwp, 'TBBT')
>>> not page.isDisambig()
True
>>> page.isRedirectPage()
False
>>> page.text
'#REDIRECT [[The Big Bang Theory]]'
>>> page.isRedirectPage()
True
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=71399
Bug ID: 71399
Summary: imagetransfer.py has bug
Product: Pywikibot
Version: core (2.0)
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: Unprioritized
Component: Other scripts
Assignee: Pywikipedia-bugs(a)lists.wikimedia.org
Reporter: reza.energy(a)gmail.com
Web browser: ---
Mobile Platform: ---
imagetransfer.py has bug I run the command in below:
python pwb.py imagetransfer -family:wikipedia -lang:en 'File:John_Fowles.jpg'
-tolang:fa -tofamily:wikipedia -keepname
bot shows this error:
Traceback (most recent call last):
File "pwb.py", line 171, 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/imagetransfer.py", line 341, in <module>
main()
File "scripts/imagetransfer.py", line 338, in main
bot.run()
File "scripts/imagetransfer.py", line 291, in run
self.transferImage(imagelist[todo])
File "scripts/imagetransfer.py", line 186, in transferImage
description += '\n\n' + str(sourceImagePage.getFileVersionHistoryTable())
UnicodeEncodeError: 'ascii' codec can't encode character u'\u2013' in position
264: ordinal not in range(128)
<type 'exceptions.UnicodeEncodeError'>
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=61555
Bug ID: 61555
Summary: Check for new messages on wiki during bot run
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: valhallasw(a)arctus.nl
Web browser: ---
Mobile Platform: ---
At the moment (at least for core, and probably also for compat), new messages
are only seen if the bot is restarted. For long-running bots, it's sensible to
break/pause/stop editing on a certain wiki when a talk page is edited.
Getting the info from the wiki is easy -- just add meta=userinfo&uiprop=hasmsg
to the api query. Afterwards, meta=notifications can be used for details.
Added bonus: every api query returns a check whether the user is still logged
in correctly.
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=70969
Bug ID: 70969
Summary: xmlreader test errors on win32 py3
Product: Pywikibot
Version: core (2.0)
Hardware: All
OS: Windows XP
Status: NEW
Severity: normal
Priority: Unprioritized
Component: tests
Assignee: Pywikipedia-bugs(a)lists.wikimedia.org
Reporter: jayvdb(a)gmail.com
Web browser: ---
Mobile Platform: ---
test_XmlDumpAllRevs (tests.xmlreader_tests.XmlReaderTestCase) ...
c:\pywiki\core\tests\xmlreader_tests.py:25: ResourceWarning: unclosed file
<_io.TextIOWrapper name='c:\\pywiki\\core\\tests\\data\\article-pear.xml'
mode='r' encoding='cp
1252'>
pages = [r for r in
ok
test_XmlDumpFirstRev (tests.xmlreader_tests.XmlReaderTestCase) ...
c:\pywiki\core\tests\xmlreader_tests.py:38: ResourceWarning: unclosed file
<_io.TextIOWrapper name='c:\\pywiki\\core\\tests\\data\\article-pear.xml'
mode='r' encoding='c
p1252'>
pages = [r for r in
ok
test_XmlDumpRedirect (tests.xmlreader_tests.XmlReaderTestCase) ... ERROR
c:\Python34\lib\unittest\case.py:605: ResourceWarning: unclosed file
<_io.TextIOWrapper name='c:\\pywiki\\core\\tests\\data\\article-pyrus.xml'
mode='r' encod
ing='cp1252'>
outcome.errors.clear()
--
You are receiving this mail because:
You are the assignee for the bug.