Hi,
I ran:
python imagetransfer.py 'File:matplotlib_screenshot.png' -tofamily:lwiki
-tolang:en -family:commons -lang:commons
and received the output:
/var/www/localhost/htdocs/w/core /var/www/localhost/htdocs/w/core
- Found image: [[File:Matplotlib screenshot.png]]
== {{int:filedesc}} == {{Information |Description ={{en|1=A screenshot showing [[:en:Matplotlib|Matplotlib]] plots of one 3D ''plot_surface'' graph and a polar bar graph resembling the Matplotlib logo together with the graphic's python source code opened in a text editor.}} |Source ={{own}} |Date =2014-05-01 |Author =[[User:Geek3|Geek3]] |Permission = |other_versions = }} == {{int:license-header}} == {{self|GFDL|cc-by-3.0}} [[Category:Screenshots of software]] [[Category:Debian screenshots]] [[Category:Created with Matplotlib]] ============================================================ The image is already on Wikimedia Commons. /var/www/localhost/htdocs/w/core
Which I found confusing. I have InstantCommons enabled on my Wiki, if relevant. No File:Matplotlib_screenshot.png page or file exists on my Wiki (except for the mirror version of the page that exists due to InstantCommons). Transferring from the English Wikipedia (namely transferring File:Matplotlib_logo.svg) gives a different message (this one is an error message):
ERROR: Traceback (most recent call last):
File "/usr/lib64/python2.7/site-packages/pywikibot-2.0rc1.post2-py2.7.egg/pywikibot/data/api.py", line 1927, in submit body=body, headers=headers) File "/usr/lib64/python2.7/site-packages/pywikibot-2.0rc1.post2-py2.7.egg/pywikibot/tools/__init__.py", line 1248, in wrapper return obj(*__args, **__kw) File "/usr/lib64/python2.7/site-packages/pywikibot-2.0rc1.post2-py2.7.egg/pywikibot/comms/http.py", line 244, in request r = fetch(baseuri, method, body, headers, **kwargs) File "/usr/lib64/python2.7/site-packages/pywikibot-2.0rc1.post2-py2.7.egg/pywikibot/comms/http.py", line 401, in fetch error_handling_callback(request) File "/usr/lib64/python2.7/site-packages/pywikibot-2.0rc1.post2-py2.7.egg/pywikibot/comms/http.py", line 318, in error_handling_callback raise request.data ReadTimeout: HTTPConnectionPool(host='localhost', port=80): Read timed out. (read timeout=30) WARNING: Waiting 5 seconds before retrying.
which was repeated until the last line became: "WARNING: Waiting 40 seconds before retrying". After this was the following error message:
We got the following warning(s): exists: File Matplotlib_Logo.svg already exists. Do you want to ignore? ([y]es, [N]o): n Upload aborted. /var/www/localhost/htdocs/w/core
But the transfer did occur successfully (i.e., File:Matplotlib_Logo.svg now exists).
Thanks for your time, Brenton
Hi,
On 08/24/2015 05:42 PM, Brenton Horne wrote:
Which I found confusing. I have InstantCommons enabled on my Wiki, if relevant. No File:Matplotlib_screenshot.png page or file exists on my Wiki (except for the mirror version of the page that exists due to InstantCommons).
Maybe a silly question, but why are you trying to upload the file locally if you have InstantCommons enabled? The whole point of InstantCommons is so you *don't* have to do this.
-- Legoktm
InstantCommons is more a temporary solution to this pywikibot problem that I've set up.
On 25 August 2015 at 16:24, Legoktm legoktm.wikipedia@gmail.com wrote:
Hi,
On 08/24/2015 05:42 PM, Brenton Horne wrote:
Which I found confusing. I have InstantCommons enabled on my Wiki, if relevant. No File:Matplotlib_screenshot.png page or file exists on my Wiki (except for the mirror version of the page that exists due to InstantCommons).
Maybe a silly question, but why are you trying to upload the file locally if you have InstantCommons enabled? The whole point of InstantCommons is so you *don't* have to do this.
-- Legoktm
pywikibot mailing list pywikibot@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot