Fae added a comment.
As a separate experiment, here's the results of locally saving a 264MB PDF from archive.org, then running the site.upload from a command line instead of within Python. Local directory names trimmed for privacy but have no logical effect. This was a meaningful experiment as a work-around could have been to locally cache the largest files and url upload the rest, however it seems to have no effect on outcomes. A low chunk size of 500k was used to avoid local memory problems. This failed with interesting //DBQueryErrors// on the way before being aborted with //stashfailed//. python pwb.py upload -filename:"Motion Picture News (Jul-Oct 1915) (IA motionpicturenew121unse).pdf" -chunked:500k -summary:"Manual upload to test a point about chunked uploading" motionpicturenew121unse.pdf "Source = https://archive.org/stream/motionpicturenew121unse\n{{PD-USGov}}" The filename on the target wiki will default to: Motion Picture News (Jul-Oct 1915) (IA motionpicturenew121unse).pdf Enter a better name, or press enter to accept: The suggested description is: Source = https://archive.org/stream/motionpicturenew121unse\n{{PD-USGov}} Do you want to change this description? ([y]es, [N]o, [q]uit): n Uploading file to commons:commons... Sleeping for 24.7 seconds, 2020-06-19 17:23:20 WARNING: Unexpected offset. WARNING: Unexpected offset. WARNING: Unexpected offset. WARNING: Waiting 5 seconds before retrying. WARNING: API error internal_api_error_DBQueryError: [d9e6fdd1-8af1-49ad-a89b-fca1f4e06198] Caught exception of type Wikimedia\Rdbms\DBQueryError ERROR: Detected MediaWiki API exception internal_api_error_DBQueryError: [d9e6fdd1-8af1-49ad-a89b-fca1f4e06198] Caught exception of type Wikimedia\Rdbms\DBQueryError [errorclass:Wikimedia\Rdbms\DBQueryError; servedby:mw1394]; retrying WARNING: Waiting 10 seconds before retrying. WARNING: API error internal_api_error_DBQueryError: [341ea9fe-880c-462b-925e-6898043bdefb] Caught exception of type Wikimedia\Rdbms\DBQueryError ERROR: Detected MediaWiki API exception internal_api_error_DBQueryError: [341ea9fe-880c-462b-925e-6898043bdefb] Caught exception of type Wikimedia\Rdbms\DBQueryError [errorclass:Wikimedia\Rdbms\DBQueryError; servedby:mw1358]; retrying WARNING: Waiting 20 seconds before retrying. WARNING: API error internal_api_error_DBQueryError: [15f88480-ee34-4c83-8f51-4e0777fc08d0] Caught exception of type Wikimedia\Rdbms\DBQueryError ERROR: Detected MediaWiki API exception internal_api_error_DBQueryError: [15f88480-ee34-4c83-8f51-4e0777fc08d0] Caught exception of type Wikimedia\Rdbms\DBQueryError [errorclass:Wikimedia\Rdbms\DBQueryError; servedby:mw1402]; retrying WARNING: Waiting 40 seconds before retrying. WARNING: Http response status 500 WARNING: Non-JSON response received from server commons:commons; the server may be down. WARNING: Waiting 80 seconds before retrying. WARNING: API error stashfailed: Chunked upload is already completed, check status for details. ERROR: Upload error: Traceback (most recent call last): File "/home/.../core/pywikibot/specialbots.py", line 430, in upload_file comment=self.summary) File "/home/.../core/pywikibot/page.py", line 2674, in upload **kwargs) File "/home/.../core/pywikibot/tools/__init__.py", line 1488, in wrapper return obj(*__args, **__kw) File "/home/.../core/pywikibot/site.py", line 6397, in upload raise error APIError: stashfailed: Chunked upload is already completed, check status for details. [help:See https://commons.wikimedia.org/w/api.php for API usage. Subscribe to the mediawiki-api-announce mailing list at <https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce> for notice of API deprecations and breaking changes.] 1 pages read 0 pages written Script terminated successfully. TASK DETAIL https://phabricator.wikimedia.org/T254459 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Fae Cc: eprodromou, AntiCompositeNumber, ShakespeareFan00, Dvorapa, Aklapper, pywikibot-bugs-list, Fae, Naike, CBogen, Biazzzzoo, Philoserf, CptViraj, WDoranWMF, Chambersjay, DannyS712, JKSTNK, Jony, Amorymeltzer, Conradrock, Ramsey-WMF, Sethakill, dg711, Poyekhali, Agabi10, Taiwania_Justo, Pchelolo, Ixocactus, Wong128hk, Hydriz, El_Grafo, Dinoguy1000, jayvdb, Anomie, Steinsplitter, Rxy, Jay8g, fgiunchedi, Keegan, Legoktm, Tgr
_______________________________________________ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs