Xqt added projects: Pywikibot-Commons, Upstream, Commons.
Xqt added a comment.
I guess you have modified a script (don't know which one) with the following
(seen in T668969):
retry_count = 3 # Number of upload retries
success = False
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.")
Pywikibot already retries uploading 15 times by default. You change increases
this 3 times which means 45 retries for timeouts. You already have increased
the socket timeouts and I have no glue what to do in Pywikibot site, seems it
is a server side problem on commons' API.
TASK DETAIL
https://phabricator.wikimedia.org/T338603
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Xqt
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]