$ python pwb.py scripts/replace.py -family:commons -cat:"Scans by the Internet Archive selected by BEIC" etc. etc. WARNING: Http response status 500 WARNING: Non-JSON response received from server commons:commons; the server may be down. Set gcmlimit = ['250'] WARNING: Waiting 5 seconds before retrying. WARNING: Http response status 500 WARNING: Non-JSON response received from server commons:commons; the server may be down. Set gcmlimit = ['125'] WARNING: Waiting 10 seconds before retrying. WARNING: API warning (result): This result was truncated because it would otherwise be larger than the limit of 12,582,912 bytes Retrieving 50 pages from commons:commons. No changes were necessary in [[File:Alberti - De re aedificatoria, 1541.djvu]]
This is probably due to the img_metadata field being huge for DjVu files, see also https://commons.wikimedia.org/w/index.php?title=Help_talk:VisualFileChange.js&diff=prev&oldid=162565292 for a similar problem in a JavaScript request for prop=imageinfo.
I don't think that an error 500 is the expected result.