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] ------------------------------------------------------------ 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?