Yann added a comment.

  The script I use now which produces the errors above:
  
    while retry_count > 0 and not success:
        try:
            filepage = pywikibot.FilePage(site, key)
            filepage.upload(
                source=filename,
                comment=desc_content,
                text=desc_content,
                chunk_size = "5M",
                ignore_warnings=False,
            )
            success = True
        except Exception as e:
            print("Upload failed. Retrying...")
            retry_count -= 1
    
    if not success:
        print("Upload failed after retries.")

TASK DETAIL
  https://phabricator.wikimedia.org/T338603

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Yann
Cc: JJMC89, Xqt, Aklapper, pywikibot-bugs-list, Yann, Udehb-WMF, PotsdamLamb, 
Jyoo1011, Y.ssk, JohnsonLee01, SHEKH, Dijkstra, Muchiri124, CBogen, ItamarWMDE, 
Khutuck, Zkhalido, darthmon_wmde, Rosalie_WMDE, Viztor, Wenyi, Tbscho, MayS, 
Mdupont, Dvorapa, Altostratus, Taiwania_Justo, Avicennasis, Ixocactus, 
Wong128hk, Verdy_p, mys_721tx, El_Grafo, Dinoguy1000, jayvdb, Masti, 
Alchimista, Jdforrester-WMF, Steinsplitter, Jay8g, Krenair
_______________________________________________
pywikibot-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to