RedKhan16 created this task.
RedKhan16 added a project: Pywikibot.
Restricted Application added subscribers: pywikibot-bugs-list, Aklapper.

TASK DESCRIPTION
  Greetings!
  I'm trying to mass re-upload new versions of existing files to Fandom using 
Pywikibot, but get an error. Here is a part of output from one attempt
  
    Uploading file to ageofempires:en...
    WARNING: /home/user/pywikibot/core/pywikibot/page/__init__.py:2565: 
FutureWarning: "ignore_warnings" as a boolean and "report_success" is True or 
None is deprecated for 5 years and 4 months; use "report_success=False" or 
define "ignore_warnings" as callable/iterable instead.
    return self.site.upload(self, source_filename=filename, source_url=url,
    
    WARNING: API error fileexists-forbidden: A file with this name already 
exists, and cannot be overwritten. If you still want to upload your file, 
please go back and use a new name. 
[[File:Britons_King_Move_3_AoE2.ogg|thumb|center|Britons_King_Move_3_AoE2.ogg]]
    API Error: query=
    ("{'action': ['upload'], 'token': "
    "['here_was_token'], 'text': ['New version"
    'with higher quality of a dialogue file for a Briton unit in Age of Empires'
    "2'], 'filename': ['Britons King Move 3 AoE2.ogg'], 'comment': ['New 
version"
    'with higher quality of a dialogue file for a Briton unit in Age of Empires'
    "2'], 'assert': ['user'], 'watch': [False], 'ignorewarnings': [True],"
    "'maxlag': ['5'], 'format':['json']}")
    response=
    {'error': {'code': 'fileexists-forbidden', 'info': 'A file with this name 
already exists, and cannot be overwritten. If you still want to upload your 
file, please go back and use a new name. 
[[File:Britons_King_Move_3_AoE2.ogg|thumb|center|Britons_King_Move_3_AoE2.ogg]]',
 'filekey': '181qqtpbrbxc.p9l6p4.47783138.ogx', 'sessionkey': 
'181qqtpbrbxc.p9l6p4.47783138.ogx', 'invalidparameter': 'filename', 'help': 
'See https://ageofempires.fandom.com/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.'}}
    ERROR: Upload error:
  
  I contacted Fandom support and they pointed out that according to here 
<https://www.mediawiki.org/wiki/API:Upload#Upload_warnings> ignore_warnings 
must be set to reupload.

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

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

To: RedKhan16
Cc: Aklapper, pywikibot-bugs-list, RedKhan16, JohnsonLee01, SHEKH, Dijkstra, 
Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Dvorapa, 
Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista, Rxy
_______________________________________________
pywikibot-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs

Reply via email to