Page MenuHomePhabricator

titleblacklist-forbidden when uploading to commons through pywikibot
Closed, InvalidPublic

Description

I've started to mass upload files from Flickr (as there seemed to be a need to upload before it starts to delete pictures). Thus, I downloaded a whole Flickr stream, sanitized names and started to upload. However, I keep on receiving messages such as this:

pywikibot.data.api.APIError: titleblacklist-forbidden: ⧼titleblacklist-custom-filename⧽ [message:{'key': 'titleblacklist-custom-filename', 'params': [' File:\\P{L}*\\.[^.]+ <reupload|errmsg=titleblacklist-custom-filename>', 'File:2017-03-18 20.57.33 (33527105145).jpg']}; line: File:\P{L}*\.[^.]+ <reupload|errmsg=titleblacklist-custom-filename>; filekey:1664nnvgt7q8.aqks42.3572532.jpg; sessionkey:1664nnvgt7q8.aqks42.3572532.jpg; invalidparameter:filename; help:See https://commons.wikimedia.org/w/api.php for API usage. Subscribe to the mediawiki-api-announce mailing list at &lt;https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce&gt; for notice of API deprecations and breaking changes.]

It's really weird, as I can upload the very same file from Flickr using the built-in feature in Commons upload form and it accepts it, with exactly the very same filename. I cannot understand the regular expression provided as rationale, but I'm not actually sure it's a problem with the name.

Event Timeline

Discasto created this task.Nov 10 2018, 1:04 AM
Restricted Application added subscribers: pywikibot-bugs-list, Aklapper. · View Herald TranscriptNov 10 2018, 1:04 AM

\p{L} matches a character with the Unicode "letter" category; \P{L} matches a character not in that category. So the regex File:\P{L}*\.[^.]+ matches, approximately, any filenames containing only non-letter characters followed by a period and an extension. If I had to guess, numbers don't have the "letter" Unicode category, and so are matched by \P{L} (the same as the whitespace, dashes, parentheses, and periods), though I can't say why the Flickr import wouldn't trigger that regex (maybe the Flickr import tool bypasses the title blacklist?).

Xqt triaged this task as Medium priority.Nov 10 2018, 5:50 AM

I can upload the very same file from Flickr using the built-in feature in Commons upload form and it accepts it

What is this built-in feature? The flickr upload of UploadWizard? or https://commons.wikimedia.org/w/index.php?title=Special:Upload&uselang=fromflickr?

with exactly the very same filename

https://commons.wikimedia.org/wiki/File:2017-03-18_20.57.33_(33527105145).jpg never existed.

Sorry, my mistake. I didn't ended the process and simply verified that the files was correctly read. Now, when attempting to end the process, a warning about the name popped up and therefore I've acknowledged that names without any letter are forbidden. Sorry for the inconvenience :-(

Zoranzoki21 closed this task as Invalid.Nov 10 2018, 2:31 PM
Zoranzoki21 added a subscriber: Zoranzoki21.

File:2017-03-18 20.57.33 (33527105145).jpg is bad name of file, and files must not be uploaded with names like this.