Last modified: 2014-10-07 09:00:50 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T73727, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 71727 - chunked upload does not ignore warnings
chunked upload does not ignore warnings
Status: RESOLVED DUPLICATE of bug 58907
Product: Pywikibot
Classification: Unclassified
network (Other open bugs)
unspecified
All All
: Unprioritized normal
: ---
Assigned To: Pywikipedia bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-10-07 02:54 UTC by John Mark Vandenberg
Modified: 2014-10-07 09:00 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description John Mark Vandenberg 2014-10-07 02:54:27 UTC
If a file already exists on the server with the same title, chunked Site.upload fails with:

Traceback (most recent call last):
  File "tests/upload_tests.py", line 45, in test_png_chunked
    ignore_warnings=True, chunk_size=1024)
  File ".../pywikibot/tools.py", line 367, in wrapper
    return method(*__args, **__kw)
  File ".../pywikibot/site.py", line 4404, in upload
    % {'msg': message})
UploadWarning: exists: File MP_sounds-pwb.png already exists.

Chunked uploading with a new title works correctly:

https://test.wikipedia.org/wiki/File:MP_sounds-pwb-chunked.png
Comment 1 John Mark Vandenberg 2014-10-07 07:05:42 UTC
In addition to a bug in pywikibot (already fixed in bug 71400), there appears to also be a bug in mediawiki (bug 71737), as the API response does not include an offset which our code currently relies on.
Comment 2 Fabian 2014-10-07 09:00:50 UTC
This is actually the same error as in bug 58907 (just that we have to catch it at a different place).

Open another report about the missing offset. I tested the chunked upload locally on a test server (1.23 though) and there I always got a offset result. But as long as the new offset is simply "old offset + chunk size" we can do that calculation (if needed) on our own.

*** This bug has been marked as a duplicate of bug 58907 ***

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links