reedy@ubuntu64-web-esxi:/var/www/wiki/mediawiki/extensions/ConfirmEdit$ python3 captcha.py --wordlist=~/words --badwordlist=~/badwords --key='foo' --output=/tmp/captchas --font=/usr/share/fonts/truetype/freefont/FreeMonoBoldOblique.ttf --verbose --fill=1000
Traceback (most recent call last):
File "/var/www/wiki/mediawiki/extensions/ConfirmEdit/captcha.py", line 436, in <module>
count = max(0, fill - len(os.listdir(output)))
^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/captchas'
reedy@ubuntu64-web-esxi:/var/www/wiki/mediawiki/extensions/ConfirmEdit$ mkdir /tmp/captchasDescription
Details
Related Objects
- Mentioned In
- T3: Upgrade logstash elasticsearch instance to latest version
T395810: captcha.py: Doesn't like use of ~/filename
T388531: Migrate Security-Team jobs to mw-cron - Mentioned Here
- T3: Upgrade logstash elasticsearch instance to latest version
rLPRI1153591423f9: Update patch set 1
T395810: captcha.py: Doesn't like use of ~/filename
T388531: Migrate Security-Team jobs to mw-cron
Event Timeline
The behaviour is inconsistent between specifying --fill and not:
python3 /srv/mediawiki/php-1.45.0-wmf.3/extensions/ConfirmEdit/captcha.py --wordlist=/tmp/words --badwordlist=/tmp/badwords --key='foo' --output=/tmp/captchas --font=/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf --verbose --fill=1000
Traceback (most recent call last):
File "/srv/mediawiki/php-1.45.0-wmf.3/extensions/ConfirmEdit/captcha.py", line 421, in <module>
count = max(0, fill - len(os.listdir(output)))
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/captchas'
www-data@b386d95fae9d:/$ python3 /srv/mediawiki/php-1.45.0-wmf.3/extensions/ConfirmEdit/captcha.py --wordlist=/tmp/words --badwordlist=/tmp/badwords --key='foo' --output=/tmp/captchas --font=/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf --verbose
Generating 20 CAPTCHA images separated in 20 image(s) per chunk run by 1 threads...
[...]
image_a3336939_ad9b6da10e44bb26.pngChange #1152753 had a related patch set uploaded (by Reedy; author: Reedy):
[mediawiki/extensions/ConfirmEdit@master] captcha.py: Check if output dir exists, and attempt to create it (else error)
Change #1152753 merged by jenkins-bot:
[mediawiki/extensions/ConfirmEdit@master] captcha.py: Check if output dir exists, and attempt to create it (else error)
Change #1152821 had a related patch set uploaded (by Reedy; author: Reedy):
[mediawiki/extensions/ConfirmEdit@REL1_43] captcha.py: Check if output dir exists, and attempt to create it (else error)
Change #1152822 had a related patch set uploaded (by Reedy; author: Reedy):
[mediawiki/extensions/ConfirmEdit@REL1_44] captcha.py: Check if output dir exists, and attempt to create it (else error)
Change #1152822 merged by jenkins-bot:
[mediawiki/extensions/ConfirmEdit@REL1_44] captcha.py: Check if output dir exists, and attempt to create it (else error)
Change #1152821 merged by jenkins-bot:
[mediawiki/extensions/ConfirmEdit@REL1_43] captcha.py: Check if output dir exists, and attempt to create it (else error)
Change #1153593 had a related patch set uploaded (by Reedy; author: Reedy):
[mediawiki/extensions/ConfirmEdit@wmf/1.45.0-wmf.3] captcha.py: Check if output dir exists, and attempt to create it (else error)
Change #1153593 merged by jenkins-bot:
[mediawiki/extensions/ConfirmEdit@wmf/1.45.0-wmf.3] captcha.py: Check if output dir exists, and attempt to create it (else error)
Mentioned in SAL (#wikimedia-operations) [2025-06-04T12:18:22Z] <reedy@deploy1003> Started scap sync-world: Backport for [[gerrit:rLPRI1153591423f9|GenerateFancyCaptchas: Handle captcha.py not generating any captchas, but not erroring (T388531)]], [[gerrit:1153592|captcha.py: Expand variables and user in filenames (T395810)]], [[gerrit:1153593|captcha.py: Check if output dir exists, and attempt to create it (else error) (T395804)]], [[gerrit:1153595|captcha.py: Bail out if no words were read
Mentioned in SAL (#wikimedia-operations) [2025-06-04T12:20:31Z] <reedy@deploy1003> reedy: Backport for [[gerrit:rLPRI1153591423f9|GenerateFancyCaptchas: Handle captcha.py not generating any captchas, but not erroring (T388531)]], [[gerrit:1153592|captcha.py: Expand variables and user in filenames (T395810)]], [[gerrit:1153593|captcha.py: Check if output dir exists, and attempt to create it (else error) (T395804)]], [[gerrit:1153595|captcha.py: Bail out if no words were read from wordlist (T3
Mentioned in SAL (#wikimedia-operations) [2025-06-04T12:28:13Z] <reedy@deploy1003> Finished scap sync-world: Backport for [[gerrit:rLPRI1153591423f9|GenerateFancyCaptchas: Handle captcha.py not generating any captchas, but not erroring (T388531)]], [[gerrit:1153592|captcha.py: Expand variables and user in filenames (T395810)]], [[gerrit:1153593|captcha.py: Check if output dir exists, and attempt to create it (else error) (T395804)]], [[gerrit:1153595|captcha.py: Bail out if no words were rea