Page MenuHomePhabricator

uploading a .webm with a file name identical to a jpg name fails with a cryptic error: ERROR: Upload error: 'exists-normalized'
Closed, DeclinedPublic

Description

I tried to upload https://commons.wikimedia.org/wiki/File:Hardcourt_Bike_Polo_game.webm with the name Hardcourt_Bike_Polo.webm, but it fails with the above error.

This seems to be caused by the existence of https://commons.wikimedia.org/wiki/File:Hardcourt_Bike_Polo.jpg, and i guess the fact that thumbnails are rendered to jpg with the same file name.

Not sure if it is a bug or a feature, but the error message is not clear.

Event Timeline

Matanya raised the priority of this task from to Needs Triage.
Matanya updated the task description. (Show Details)
Matanya added a project: Multimedia.
Matanya subscribed.

That is technically just a warning which you could ignore but Pywikibot doesn't know of it and fails. I'd like to know what the warning says exactly. Maybe we can get pywikibot not to fail on APISite.upload if the warning code is unknown but instead just builds a generic warning.

So maybe it's cryptic because of pywikibot or it's cryptic because the API doesn't report more on that warning.

Okay the API just returns the file name with which it collides: {'exists-normalized': 'Spacex_falcon_crs6_land.png'}.

Neither UploadWizard nor core Special:Upload behave as described, so I'm guessing this is related to pywikibot, which was mentioned above? (Similar but different bug for UW is T48741.)

No it's the API that behaves that way. Pywikibot just forwarded that error.

It looks like https://gerrit.wikimedia.org/r/#/c/237725/ is going to 'fix' it, but that may need changes on our side.

(Similar but different bug for UW is T48741.)

To clarify this: This bug is about the fact that error message from the API is not clear and that error message has nothing to do with pywikibot. It was just found via pywikibot and we first needed to actually figure what this code meant. And there it was fixed in 66e120d5. So I'll readd the projects and if the API developers think the error message is fine as it is now (although it might have been changed in the meantime) they should close it.

It looks like https://gerrit.wikimedia.org/r/#/c/237725/ is going to 'fix' it, but that may need changes on our side.

I don't see how that is going to fix it as the JPG wasn't deleted.

Anomie claimed this task.
Anomie subscribed.

and if the API developers think the error message is fine as it is now (although it might have been changed in the meantime) they should close it.

Ok. The API isn't intending to return human-readable messages here, it returns codes that the client should use to display appropriate feedback to the user as UploadWizard does.