Yann added a comment.

  Hi, I removed the `retry_count`, and I now get another issue:
  
  Code
  ----
  
    except exceptions.UploadError as e:
        # 
https://doc.wikimedia.org/pywikibot/master/api_ref/exceptions.html#exceptions.UploadError
        print(f"Upload failed with error code: {e.code}")
        print(f"Error message: {e.message}")
        print(f"File key: {e.file_key}")
        print(f"Offset: {e.offset}")
  
  
  
  Error
  -----
  
    File: workspoevol4_05_poe.mp3
    Title: 05 - The System of Doctor Tarr and Professor Fether
    
https://www.archive.org/download/poeraven_vol4_1308_librivox/workspoevol4_05_poe.mp3
    Sleeping for 3.3 seconds, 2023-07-01 21:43:47
    WARNING: Waiting 5.0 seconds before retrying.
    WARNING: Waiting 10.0 seconds before retrying.
    WARNING: 
/cygdrive/c/Users/yannf/OneDrive/Documents/core_stable/pywikibot/site/_upload.py:133:
 UserWarning: The upload returned 2 warnings: exists, nochange
      return self._upload(self.ignore_warnings, self.report_success)
    
    Upload failed with error code: exists
    Error message: File Workspoevol4_05_poe.mp3 already exists.
    File key: None
    Offset: False
    Upload failed after retries.
  
  The file uploaded successfully before the bot retried uploading it: 
https://commons.wikimedia.org/wiki/File:Workspoevol4_05_poe_128kb.mp3 (37.69 MB)
  It seems the server didn't send a successful upload message, that's why the 
bot retried uploading the file after a successful upload.
  This is not a single occurrence of this behavior. I have many examples of 
such cases.

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