Could you file a task at Phabricator please.
xqt
Am 10.10.2020 um 11:45 schrieb John Bray johnbray822@gmail.com:
No idea about the api as manual upload works.
I've decided that using the maintenance script 'php importImages.php --source-wiki-url="http://oldwiki/" 2' works well enough, as I've lost confidence in ImageTransfer.
On Fri, 9 Oct 2020 at 19:19, info@gno.de wrote:
Hi John,
the bot found an api error with code uploaddisabled and the given info message. This is on the site side and there is nothing on pywikibot side what can be done I guess.
The deprecation warning does not care yet. Normally you should not see it by the default configuration. This warnings are shown on debug level only. But you should care about FutureWarnings on your on your own scripts. These warnings indicate a method or class to be removed but not earlier than the over next release.
Best xqt
Am 09.10.2020 um 16:58 schrieb John Bray johnbray822@gmail.com:
I want to do a controlled transfer of parts of one wiki to another. For the files I've transferred the images directory, but the metadata for the File:Happy.jpg page is missing, so I thought I'd try https://www.mediawiki.org/wiki/Manual:Pywikibot/imagetransfer.py
I've got a page list with pwb.py listpages -ns:File -start -format:"{page.title}" > Files.list, but when try to transfer the pages with
pwb.py imagetransfer -v File:Happy.jpeg -tofamily:newwiki Python 2.7.17 (default, Jul 20 2020, 15:37:01) [GCC 7.5.0]
- Found image: [[File:Happy.jpeg]]
Found 1 oldwiki:en-gb processes running, including this one.
Found 1 newwiki:en-gb processes running, including this one.
WARNING: /home/john/bin/pywikibot/core/scripts/imagetransfer.py:143: DeprecationWarning: pywikibot.page.FilePage.fileUrl is deprecated for 4 years and 4 months; use get_ file_url instead. url = sourceImagePage.fileUrl().encode('utf-8')
URL should be: http://oldwiki.priory/images/1/1/Happy.jpeg WARNING: /data/priory1/home/john/bin/pywikibot/core1/pywikibot/page.py:2605: DeprecationWarning: pywikibot.page.FilePage.getFileVersionHistory is deprecated for 5 years and 11 months; use FilePage.get_file_history() instead. for info in self.getFileVersionHistory():
WARNING: url as string is deprecated. Use an iterable instead. Logging in to newwiki:en-gb as John@johnbot Should be logged in now ERROR: Upload error: Local file uploads are disabled on newwiki:en-gb. Dropped throttle(s). Closing network session. Network session closed.
So I checked newwiki/LocalSettings.php, and it has $wgEnableUploads = true;
Is there something I'm missing to get the image uploaded, and does the 5 year DeprecationWarning mean this script is unsupported, so should be avoided?
pywikibot mailing list pywikibot@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot
pywikibot mailing list pywikibot@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot
pywikibot mailing list pywikibot@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot